Class TokenVerifierServiceImpl

java.lang.Object
api.mpba.rastvdmy.service.impl.TokenVerifierServiceImpl
All Implemented Interfaces:
TokenVerifierService

@Service public class TokenVerifierServiceImpl extends Object implements TokenVerifierService
Service for extracting token and getting user data from 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 operations
      userProfileRepository - 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:
      getUserData in interface TokenVerifierService
      Parameters:
      request - the HTTP request containing user information
      Returns:
      the user profile
      Throws:
      ApplicationException - if the user is not found or is blocked