Package net.shibboleth.oidc.profile.core
Class OAuthAuthorizationRequest
java.lang.Object
net.shibboleth.oidc.profile.core.OAuthAuthorizationRequest
- Direct Known Subclasses:
OIDCAuthenticationRequest
An OAuth 2.0 authorization request.
This class is mutable and not thread-safe.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe code challenge method for Proof Key for Code Exchange. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.nimbusds.oauth2.sdk.id.ClientIDThe client identifier.private StringThe authorisation code_challenge for Proof Key for Code Exchange.The authorisation code_challenge_method used for Proof Key for Code Exchange.private StringThe authorisation code_verifier for Proof Key for Code Exchange.private com.nimbusds.oauth2.sdk.ResponseModeThe default response mode for the given response_type.private URIThe request endpoint.private URIThe redirect URI to which the response will be sent.private com.nimbusds.oauth2.sdk.ResponseModeThe response mode.private com.nimbusds.oauth2.sdk.ResponseTypeThe authorization processing flow to use.private final com.nimbusds.oauth2.sdk.ScopeThe requested scopes.private com.nimbusds.oauth2.sdk.id.StateThe state. -
Constructor Summary
ConstructorsConstructorDescriptionOAuthAuthorizationRequest(com.nimbusds.oauth2.sdk.id.ClientID id) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncom.nimbusds.oauth2.sdk.id.ClientIDGet the client ID.Get the authorisation code_challenge (which was derived from the code_verifier) for Proof Key for Code Exchange.Get the code_challenge_method used to transform the code_verifier into a code_challenge.Get the authorisation code_verifier for Proof Key for Code Exchange.com.nimbusds.oauth2.sdk.ResponseModeGet the response_mode to use with this authentication request.Get the endpoint_uri.Get the redirect_uri.com.nimbusds.oauth2.sdk.ResponseModeGet the response mode.com.nimbusds.oauth2.sdk.ResponseTypeGet the response type.com.nimbusds.oauth2.sdk.ScopegetScope()Get the scope.com.nimbusds.oauth2.sdk.id.StategetState()Get the state.voidsetCodeChallenge(String code) Get the authorisation code_challenge for Proof Key for Code Exchange.voidSet the code_challenge_method used to transform the code_verifier into a code_challenge.voidsetCodeVerifier(String code) Set the authorisation code_verifier for Proof Key for Code Exchange.voidsetDefaultResponseMode(com.nimbusds.oauth2.sdk.ResponseMode mode) Set the default response_mode for the given response_type.voidsetEndpointURI(URI uri) Set the endpoint_uri.voidsetRedirectURI(URI uri) Set the redirect_uri.voidsetResponseMode(com.nimbusds.oauth2.sdk.ResponseMode mode) Set the response mode to be used with the ongoing authentication request.voidsetResponseType(com.nimbusds.oauth2.sdk.ResponseType type) Set the response type.voidsetState(com.nimbusds.oauth2.sdk.id.State theState) Set the state.
-
Field Details
-
clientID
@Nonnull private final com.nimbusds.oauth2.sdk.id.ClientID clientIDThe client identifier. Required. -
state
@Nullable private com.nimbusds.oauth2.sdk.id.State stateThe state. -
redirectURI
The redirect URI to which the response will be sent. -
responseType
@Nullable private com.nimbusds.oauth2.sdk.ResponseType responseTypeThe authorization processing flow to use. -
endpointURI
The request endpoint. -
scope
@Nonnull private final com.nimbusds.oauth2.sdk.Scope scopeThe requested scopes. -
responseMode
@Nullable private com.nimbusds.oauth2.sdk.ResponseMode responseModeThe response mode. Optional. -
defaultResponseMode
@Nullable private com.nimbusds.oauth2.sdk.ResponseMode defaultResponseModeThe default response mode for the given response_type. Can be used to determine if the response_mode should be included in an authentication request. -
codeVerifier
The authorisation code_verifier for Proof Key for Code Exchange. -
codeChallenge
The authorisation code_challenge for Proof Key for Code Exchange. -
codeChallengeMethod
The authorisation code_challenge_method used for Proof Key for Code Exchange.
-
-
Constructor Details
-
OAuthAuthorizationRequest
public OAuthAuthorizationRequest(@Nonnull com.nimbusds.oauth2.sdk.id.ClientID id) Constructor.- Parameters:
id- the clientID. Never null.
-
-
Method Details
-
setDefaultResponseMode
public void setDefaultResponseMode(@Nullable com.nimbusds.oauth2.sdk.ResponseMode mode) Set the default response_mode for the given response_type.- Parameters:
mode- the default response_mode for the given response_type- Since:
- 2.2.0
-
getDefaultResponseMode
@Nullable public com.nimbusds.oauth2.sdk.ResponseMode getDefaultResponseMode()Get the response_mode to use with this authentication request.- Returns:
- the default response_mode
- Since:
- 2.2.0
-
getClientID
@Nonnull public com.nimbusds.oauth2.sdk.id.ClientID getClientID()Get the client ID.- Returns:
- the clientID.
-
getState
@Nullable public com.nimbusds.oauth2.sdk.id.State getState()Get the state.- Returns:
- the state.
-
setState
public void setState(@Nullable com.nimbusds.oauth2.sdk.id.State theState) Set the state. Optional.- Parameters:
theState- The state to set.
-
getRedirectURI
Get the redirect_uri.- Returns:
- the redirectURI.
-
setRedirectURI
Set the redirect_uri.- Parameters:
uri- The redirect_uri to set.
-
getResponseType
@Nullable public com.nimbusds.oauth2.sdk.ResponseType getResponseType()Get the response type.- Returns:
- the responseType.
-
setResponseType
public void setResponseType(@Nonnull com.nimbusds.oauth2.sdk.ResponseType type) Set the response type.- Parameters:
type- The responseType to set.
-
getEndpointURI
Get the endpoint_uri.- Returns:
- the endpoint_uri.
-
setEndpointURI
Set the endpoint_uri.- Parameters:
uri- The endpointURI to set.
-
getScope
@Nonnull public com.nimbusds.oauth2.sdk.Scope getScope()Get the scope.- Returns:
- the scope.
-
getResponseMode
@Nullable public com.nimbusds.oauth2.sdk.ResponseMode getResponseMode()Get the response mode.- Returns:
- the responseMode.
-
setResponseMode
public void setResponseMode(@Nullable com.nimbusds.oauth2.sdk.ResponseMode mode) Set the response mode to be used with the ongoing authentication request. This can be null if the default response_mode is to be used by the OP.- Parameters:
mode- the response mode. null if default mode is to be used.
-
setCodeVerifier
Set the authorisation code_verifier for Proof Key for Code Exchange.- Parameters:
code- The code_verifier to set.- Since:
- 3.1.0
-
getCodeVerifier
Get the authorisation code_verifier for Proof Key for Code Exchange.- Returns:
- the code_verifier.
- Since:
- 3.1.0
-
setCodeChallenge
Get the authorisation code_challenge for Proof Key for Code Exchange.- Parameters:
code- The code_challenge to set.- Since:
- 3.1.0
-
getCodeChallenge
Get the authorisation code_challenge (which was derived from the code_verifier) for Proof Key for Code Exchange.- Returns:
- Returns the code_challenge.
- Since:
- 3.1.0
-
getCodeChallengeMethod
Get the code_challenge_method used to transform the code_verifier into a code_challenge.- Returns:
- Returns the code_challenge_method.
- Since:
- 3.1.0
-
setCodeChallengeMethod
Set the code_challenge_method used to transform the code_verifier into a code_challenge.- Parameters:
method- The code_challenge_method to set.- Since:
- 3.1.0
-