Package org.forgerock.secrets.oauth2
Class AuthorizationCodeGrantTypeHandler
- java.lang.Object
-
- org.forgerock.secrets.oauth2.GrantTypeHandler
-
- org.forgerock.secrets.oauth2.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 Summary
Constructors Constructor Description AuthorizationCodeGrantTypeHandler(String clientId, String authorizationCode)
Initialises the grant type handler with the given parameters.AuthorizationCodeGrantTypeHandler(String clientId, String authorizationCode, String redirectUri, String pkceVerifier)
Initialises the grant type handler with the given parameters.
-
Method Summary
-
Methods inherited from class org.forgerock.secrets.oauth2.GrantTypeHandler
getClientId, getGrantType, toString
-
-
-
-
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.
-
-