Class JwtServiceImpl
java.lang.Object
com.bank.auth_service.service.impl.JwtServiceImpl
- All Implemented Interfaces:
JwtService
-
Constructor Summary
ConstructorsConstructorDescriptionJwtServiceImpl
(org.springframework.security.oauth2.jwt.JwtEncoder jwtEncoder) -
Method Summary
Modifier and TypeMethodDescriptionGenerates a signed JWT for the specified authenticated user.
-
Constructor Details
-
JwtServiceImpl
public JwtServiceImpl(org.springframework.security.oauth2.jwt.JwtEncoder jwtEncoder)
-
-
Method Details
-
generateToken
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 interfaceJwtService
- Parameters:
user
- the authenticated user- Returns:
- a signed JWT token as a String
-