Class AuthorizationCodeGrant

java.lang.Object
com.nimbusds.oauth2.sdk.AuthorizationGrant
com.nimbusds.oauth2.sdk.AuthorizationCodeGrant

@Immutable public class AuthorizationCodeGrant extends AuthorizationGrant
Authorisation code grant. Used in access token requests with an authorisation code.

Related specifications:

  • OAuth 2.0 (RFC 6749)
  • Proof Key for Code Exchange by OAuth Public Clients (RFC 7636)
  • Field Details

  • Constructor Details

    • AuthorizationCodeGrant

      public AuthorizationCodeGrant(AuthorizationCode code, URI redirectURI)
      Creates a new authorisation code grant.
      Parameters:
      code - The authorisation code. Must not be null.
      redirectURI - The redirection URI of the original authorisation request. Required if the {redirect_uri} parameter was included in the authorisation request, else null.
    • AuthorizationCodeGrant

      public AuthorizationCodeGrant(AuthorizationCode code, URI redirectURI, CodeVerifier codeVerifier)
      Creates a new authorisation code grant.
      Parameters:
      code - The authorisation code. Must not be null.
      redirectURI - The redirection URI of the original authorisation request. Required if the {redirect_uri} parameter was included in the authorisation request, else null.
      codeVerifier - The authorisation code verifier for PKCE, null if not specified.
  • Method Details