@Singleton
public class AccessRefreshTokenGenerator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ClaimsGenerator |
claimsGenerator |
protected io.micronaut.context.event.ApplicationEventPublisher |
eventPublisher |
protected JwtGeneratorConfiguration |
jwtGeneratorConfiguration |
protected TokenGenerator |
tokenGenerator |
protected TokenRenderer |
tokenRenderer |
Constructor and Description |
---|
AccessRefreshTokenGenerator(JwtGeneratorConfiguration jwtGeneratorConfiguration,
TokenRenderer tokenRenderer,
TokenGenerator tokenGenerator,
ClaimsGenerator claimsGenerator,
io.micronaut.context.event.ApplicationEventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<AccessRefreshToken> |
generate(java.lang.String refreshToken,
java.util.Map<java.lang.String,java.lang.Object> oldClaims)
Generate an
AccessRefreshToken response for the given
refresh token and claims. |
java.util.Optional<AccessRefreshToken> |
generate(UserDetails userDetails)
Generate an
AccessRefreshToken response for the given
user details. |
protected final ClaimsGenerator claimsGenerator
protected final JwtGeneratorConfiguration jwtGeneratorConfiguration
protected final TokenRenderer tokenRenderer
protected final TokenGenerator tokenGenerator
protected final io.micronaut.context.event.ApplicationEventPublisher eventPublisher
public AccessRefreshTokenGenerator(JwtGeneratorConfiguration jwtGeneratorConfiguration, TokenRenderer tokenRenderer, TokenGenerator tokenGenerator, ClaimsGenerator claimsGenerator, io.micronaut.context.event.ApplicationEventPublisher eventPublisher)
jwtGeneratorConfiguration
- Instance of JwtGeneratorConfiguration
tokenRenderer
- Instance of TokenRenderer
tokenGenerator
- Intance of TokenGenerator
claimsGenerator
- Claims generatoreventPublisher
- The Application event publiserpublic java.util.Optional<AccessRefreshToken> generate(UserDetails userDetails)
AccessRefreshToken
response for the given
user details.userDetails
- Authenticated user's representation.public java.util.Optional<AccessRefreshToken> generate(java.lang.String refreshToken, java.util.Map<java.lang.String,java.lang.Object> oldClaims)
AccessRefreshToken
response for the given
refresh token and claims.refreshToken
- The refresh tokenoldClaims
- The claims to generate the access token