Class BearerAccessRefreshToken
java.lang.Object
io.micronaut.security.token.render.AccessRefreshToken
io.micronaut.security.token.render.BearerAccessRefreshToken
Encapsulates an Access Token response as described in RFC 6749.
- Since:
- 1.0
- Author:
- Sergio del Amo
-
Constructor Summary
ConstructorDescriptionBearerAccessRefreshToken
(@NonNull String username, @Nullable Collection<String> roles, @Nullable Integer expiresIn, @NonNull String accessToken, @Nullable String refreshToken, @NonNull String tokenType) -
Method Summary
Modifier and TypeMethodDescription@Nullable Collection<String>
getRoles()
roles getter.@NonNull String
username getter.Methods inherited from class io.micronaut.security.token.render.AccessRefreshToken
getAccessToken, getExpiresIn, getRefreshToken, getTokenType, setAccessToken, setExpiresIn, setRefreshToken, setTokenType
-
Constructor Details
-
BearerAccessRefreshToken
public BearerAccessRefreshToken(@NonNull @NonNull String username, @Nullable @Nullable Collection<String> roles, @Nullable @Nullable Integer expiresIn, @NonNull @NonNull String accessToken, @Nullable @Nullable String refreshToken, @NonNull @NonNull String tokenType) - Parameters:
username
- a string e.g. adminroles
- Collection of Strings e.g. ( [ROLE_USER, ROLE_ADMIN] )expiresIn
- Access Token expirationaccessToken
- JWT tokenrefreshToken
- JWT tokentokenType
- Type of token
-
-
Method Details
-
getUsername
username getter.- Returns:
- a string e.g. admin
-
getRoles
roles getter.- Returns:
- Collection of Strings e.g. ( [ROLE_USER, ROLE_ADMIN] )
-