Uses of Class
it.univr.passportease.helper.JWT
Package
Description
-
Uses of JWT in it.univr.passportease.helper
Modifier and TypeMethodDescriptionRequestAnalyzer.getTokenFromRequest()
This method extracts the JWT token from the Authorization header of the request. -
Uses of JWT in it.univr.passportease.helper.map
Modifier and TypeMethodDescriptionMapUser.mapUserToLoginOutput
(User user, JWT accessToken) MapUser
toLoginOutput
.MapWorker.mapWorkerToLoginOutput
(Worker worker, JWT accessToken) MapWorker
toLoginOutput
-
Uses of JWT in it.univr.passportease.service.jwt
Modifier and TypeMethodDescriptionprivate JWT
JwtService.createAccessToken
(Map<String, Object> claims, UUID id) Generates a new access token.private JWT
JwtService.createRefreshToken
(UUID id) Generates a new refresh token.JwtService.generateAccessToken
(UUID id) Generates a new access token.JwtService.generateRefreshToken
(UUID id) Generates a new refresh token.Modifier and TypeMethodDescriptionprivate io.jsonwebtoken.Claims
JwtService.extractAllClaims
(JWT token) Extracts all the claims of the token.<T> T
JwtService.extractClaim
(JWT token, Function<io.jsonwebtoken.Claims, T> claimsResolver) Extracts the claims of the token.JwtService.extractExpiration
(JWT token) Extracts the expiration date of the token.Extracts the id of the user or worker from the token.JwtService.getUserOrWorkerFromToken
(JWT token) Wrapper function to return User or Worker depending on the token.JwtService.invalidateAccessToken
(JWT token) Invalidates the access token by deleting it from redis.void
JwtService.invalidateRefreshToken
(JWT token) Invalidates the refresh token by setting it to an empty string.JwtService.isTokenExpired
(JWT token) A token is expired if: it is expired it is not in redis the token in redis is not the same as the token in the request the token has nbf (not before) field and if it is after the current time the token has iat (issued at) field and if it is after the current timeprivate void
JwtService.saveRefreshTokenInDB
(UUID id, JWT refreshtoken) Saves the refresh token in the database.private void
JwtService.saveTokenInRedis
(UUID id, JWT token) Saves the token in redis with the key being the id of the user or worker.JwtService.validTokenFromUserDetails
(JWT token, org.springframework.security.core.userdetails.UserDetails userDetails) Checks if the token is valid. -
Uses of JWT in it.univr.passportease.service.user
Modifier and TypeMethodDescriptionUserQueryService.getReportDetailsByAvailabilityID
(String availabilityId, JWT token) Get the list of information for the user to generate a report.UserQueryService.getRequestTypesByUser
(JWT token) Get the list of request types for the user.UserQueryService.getUserDetails
(JWT token) Get the user details from the JWT token.UserQueryService.getUserNotifications
(JWT token) Get the list of notifications of the user.UserQueryService.getUserReservations
(JWT token) Get the list of reservations of the user. -
Uses of JWT in it.univr.passportease.service.user.impl
Modifier and TypeMethodDescriptionUserQueryServiceImpl.getReportDetailsByAvailabilityID
(String availabilityId, JWT token) Get the report details of the availability with the given UUID.UserQueryServiceImpl.getRequestTypesByUser
(JWT token) Get the list of request types that the user can make.UserQueryServiceImpl.getUserDetails
(JWT token) Get the user details from the JWT token.UserQueryServiceImpl.getUserNotifications
(JWT token) Get the list of notifications of the user.UserQueryServiceImpl.getUserReservations
(JWT token) Get the list of reservations of the user. -
Uses of JWT in it.univr.passportease.service.userworker
Modifier and TypeMethodDescriptionUserWorkerMutationService.refreshAccessToken
(JWT token, JWT refreshToken) Refresh the access token, and the refresh token in the database -
Uses of JWT in it.univr.passportease.service.userworker.impl
Modifier and TypeMethodDescriptionUserWorkerMutationServiceImpl.refreshAccessToken
(JWT token, JWT refreshToken) Refreshes the access token and the refresh token. -
Uses of JWT in it.univr.passportease.service.worker
Modifier and TypeMethodDescriptionWorkerMutationService.createRequest
(JWT token, RequestInput requestInput) Creates a request.void
WorkerMutationService.deleteRequest
(JWT token, String requestID) Deletes a request.WorkerMutationService.modifyRequest
(JWT token, String requestID, RequestInput requestInput) Modifies a request. -
Uses of JWT in it.univr.passportease.service.worker.impl
Modifier and TypeMethodDescriptionWorkerMutationServiceImpl.createRequest
(JWT token, RequestInput requestInput) Create request.void
WorkerMutationServiceImpl.deleteRequest
(JWT token, String requestID) Delete request.WorkerMutationServiceImpl.modifyRequest
(JWT token, String requestID, RequestInput requestInput) Modify request.