Class JwtServiceImpl

java.lang.Object
com.bank.auth_service.service.impl.JwtServiceImpl
All Implemented Interfaces:
JwtService

@Service public class JwtServiceImpl extends Object implements JwtService
  • Constructor Details

    • JwtServiceImpl

      public JwtServiceImpl(org.springframework.security.oauth2.jwt.JwtEncoder jwtEncoder)
  • Method Details

    • generateToken

      public String generateToken(UserAuthenticated user)
      Description copied from interface: JwtService
      Generates a signed JWT for the specified authenticated user. The token is used to authorize access to protected resources in other microservices.
      Specified by:
      generateToken in interface JwtService
      Parameters:
      user - the authenticated user
      Returns:
      a signed JWT token as a String