@Singleton
public class AccessRefreshTokenGenerator
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected AccessTokenConfiguration |
accessTokenConfiguration |
protected ClaimsGenerator |
claimsGenerator |
protected io.micronaut.context.event.ApplicationEventPublisher |
eventPublisher |
protected RefreshTokenConfiguration |
refreshTokenConfiguration |
protected RefreshTokenGenerator |
refreshTokenGenerator |
protected TokenGenerator |
tokenGenerator |
protected TokenRenderer |
tokenRenderer |
| Constructor and Description |
|---|
AccessRefreshTokenGenerator(AccessTokenConfiguration accessTokenConfiguration,
RefreshTokenConfiguration refreshTokenConfiguration,
TokenRenderer tokenRenderer,
TokenGenerator tokenGenerator,
RefreshTokenGenerator refreshTokenGenerator,
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(java.lang.String refreshToken,
UserDetails userDetails)
Generate a new access refresh token.
|
java.util.Optional<AccessRefreshToken> |
generate(UserDetails userDetails)
Generate an
AccessRefreshToken response for the given
user details. |
protected final RefreshTokenGenerator refreshTokenGenerator
protected final ClaimsGenerator claimsGenerator
protected final AccessTokenConfiguration accessTokenConfiguration
protected final RefreshTokenConfiguration refreshTokenConfiguration
protected final TokenRenderer tokenRenderer
protected final TokenGenerator tokenGenerator
protected final io.micronaut.context.event.ApplicationEventPublisher eventPublisher
public AccessRefreshTokenGenerator(AccessTokenConfiguration accessTokenConfiguration, RefreshTokenConfiguration refreshTokenConfiguration, TokenRenderer tokenRenderer, TokenGenerator tokenGenerator, @Nullable RefreshTokenGenerator refreshTokenGenerator, ClaimsGenerator claimsGenerator, io.micronaut.context.event.ApplicationEventPublisher eventPublisher)
accessTokenConfiguration - The access token generator configrefreshTokenConfiguration - The refresh token generator configtokenRenderer - The token renderertokenGenerator - The token generatorrefreshTokenGenerator - The refresh token generatorclaimsGenerator - 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 tokenpublic java.util.Optional<AccessRefreshToken> generate(java.lang.String refreshToken, UserDetails userDetails)
refreshToken - The refresh tokenuserDetails - The user details to create a new access token