Class AuthorizationCodeGrantTypeHandler


  • public class AuthorizationCodeGrantTypeHandler
    extends GrantTypeHandler
    A handler that can send an authorization code and optional PKCE verifier to the token endpoint to receive an access token. The authorization code should be obtained prior to creating this grant type handler.
    • Constructor Detail

      • AuthorizationCodeGrantTypeHandler

        public AuthorizationCodeGrantTypeHandler​(String clientId,
                                                 String authorizationCode,
                                                 String redirectUri,
                                                 String pkceVerifier)
        Initialises the grant type handler with the given parameters.
        Parameters:
        clientId - the id of the client making the request.
        authorizationCode - the authorization code.
        redirectUri - the redirect_uri that was used in the authorization request, or null if not used.
        pkceVerifier - the PKCE code verifier, or null if not used.
      • AuthorizationCodeGrantTypeHandler

        public AuthorizationCodeGrantTypeHandler​(String clientId,
                                                 String authorizationCode)
        Initialises the grant type handler with the given parameters. No redirect uri or PKCE verifier will be sent on the request.
        Parameters:
        clientId - the id of the client making the request.
        authorizationCode - the authorization code.