Class 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), section 4.1.3.
    • Proof Key for Code Exchange by OAuth Public Clients (RFC 7636).
    • Constructor Detail

      • 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.