Class AccessRefreshToken
java.lang.Object
io.micronaut.security.token.render.AccessRefreshToken
- Direct Known Subclasses:
BearerAccessRefreshToken
Stores the combination of access and refresh tokens.
- Since:
- 1.0
- Author:
- Sergio del Amo
-
Constructor Summary
ConstructorDescriptionEmpty constructor.AccessRefreshToken
(@NonNull String accessToken, @Nullable String refreshToken, @NonNull String tokenType, @Nullable Integer expiresIn) -
Method Summary
Modifier and TypeMethodDescription@NonNull String
accessToken getter.@Nullable Integer
lifetime in seconds of the access token getter.@Nullable String
refreshToken getter.@NonNull String
token type getter.void
setAccessToken
(String accessToken) void
setExpiresIn
(Integer expiresIn) void
setRefreshToken
(String refreshToken) void
setTokenType
(String tokenType)
-
Constructor Details
-
AccessRefreshToken
@Creator public AccessRefreshToken(@NonNull @NonNull String accessToken, @Nullable @Nullable String refreshToken, @NonNull @NonNull String tokenType, @Nullable @Nullable Integer expiresIn) - Parameters:
accessToken
- JWT tokenrefreshToken
- JWT tokentokenType
- Type of tokenexpiresIn
- Seconds until token expiration
-
AccessRefreshToken
public AccessRefreshToken()Empty constructor. To support Jackson data bind without bean-introspection module.
-
-
Method Details
-
getAccessToken
accessToken getter.- Returns:
- The access token
-
getRefreshToken
refreshToken getter.- Returns:
- The refresh token
-
getTokenType
token type getter.- Returns:
- TokenType e.g. Bearer
-
getExpiresIn
lifetime in seconds of the access token getter.- Returns:
- expiration time
-
setAccessToken
- Parameters:
accessToken
- Access token
-
setRefreshToken
- Parameters:
refreshToken
- Refresh token
-
setTokenType
- Parameters:
tokenType
- TokenType e.g. Bearer
-
setExpiresIn
- Parameters:
expiresIn
- lifetime in seconds of the access token
-