Class BearerAccessRefreshToken

java.lang.Object
io.micronaut.security.token.render.AccessRefreshToken
io.micronaut.security.token.render.BearerAccessRefreshToken

public class BearerAccessRefreshToken extends AccessRefreshToken
Encapsulates an Access Token response as described in RFC 6749.
Since:
1.0
Author:
Sergio del Amo
  • 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. admin
      roles - Collection of Strings e.g. ( [ROLE_USER, ROLE_ADMIN] )
      expiresIn - Access Token expiration
      accessToken - JWT token
      refreshToken - JWT token
      tokenType - Type of token
  • Method Details

    • getUsername

      @NonNull public @NonNull String getUsername()
      username getter.
      Returns:
      a string e.g. admin
    • getRoles

      @Nullable public @Nullable Collection<String> getRoles()
      roles getter.
      Returns:
      Collection of Strings e.g. ( [ROLE_USER, ROLE_ADMIN] )