Class OAuth2TokenContext

java.lang.Object
com.codename1.backend.security.oauth2.server.authorization.OAuth2TokenContext

public final class OAuth2TokenContext extends Object
One token about to be signed, as an OAuth2TokenCustomizer sees it.
  • Field Details

  • Method Details

    • getTokenType

      public String getTokenType()
    • getRegisteredClient

      public RegisteredClient getRegisteredClient()
    • getAuthorization

      public OAuth2Authorization getAuthorization()
      The grant the token is issued under; null for client_credentials, which keeps none. Its attribute authorities lists what the user had been granted when they approved.
    • getPrincipalName

      public String getPrincipalName()
      The user, or for client_credentials the client's id.
    • getAuthorizationGrantType

      public String getAuthorizationGrantType()
      The grant_type of the request the token answers.
    • getAuthorizedScopes

      public Set<String> getAuthorizedScopes()
    • getClaims

      public JwtClaimsSet.Builder getClaims()
      The claims so far, to add to or change.