Package api.mpba.rastvdmy.service.impl
Class TokenVerifierServiceImpl
java.lang.Object
api.mpba.rastvdmy.service.impl.TokenVerifierServiceImpl
- All Implemented Interfaces:
 TokenVerifierService
Service for extracting token and getting user data from the request.
- 
Constructor Summary
ConstructorsConstructorDescriptionTokenVerifierServiceImpl(JwtService jwtService, UserProfileRepository userProfileRepository) Constructs a new TokenVerifierServiceImpl with the specified JwtService and UserProfileRepository. - 
Method Summary
Modifier and TypeMethodDescriptiongetUserData(jakarta.servlet.http.HttpServletRequest request) Retrieves the user data for the user identified by the request. 
- 
Constructor Details
- 
TokenVerifierServiceImpl
@Autowired public TokenVerifierServiceImpl(JwtService jwtService, UserProfileRepository userProfileRepository) Constructs a new TokenVerifierServiceImpl with the specified JwtService and UserProfileRepository.- Parameters:
 jwtService- the service for handling JWT operationsuserProfileRepository- the repository for user profile operations
 
 - 
 - 
Method Details
- 
getUserData
public UserProfile getUserData(jakarta.servlet.http.HttpServletRequest request) throws ApplicationException Retrieves the user data for the user identified by the request.- Specified by:
 getUserDatain interfaceTokenVerifierService- Parameters:
 request- the HTTP request containing user information- Returns:
 - the user profile
 - Throws:
 ApplicationException- if the user is not authorized or is blocked
 
 -