Package com.nimbusds.openid.connect.sdk
Class AuthenticationRequest
java.lang.Object
com.nimbusds.oauth2.sdk.AbstractRequest
com.nimbusds.oauth2.sdk.AuthorizationRequest
com.nimbusds.openid.connect.sdk.AuthenticationRequest
OpenID Connect authentication request. Intended to authenticate an end-user
and request the end-user's authorisation to release information to the
client. Supports custom request parameters.
Example HTTP request (code flow):
https://server.example.com/op/authorize? response_type=code%20id_token &client_id=s6BhdRkqt3 &redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb &scope=openid &nonce=n-0S6_WzA2Mj &state=af0ifjsldkj
Related specifications:
- OpenID Connect Core 1.0
- Proof Key for Code Exchange by OAuth Public Clients (RFC 7636)
- OAuth 2.0 Rich Authorization Requests (RFC 9396)
- Resource Indicators for OAuth 2.0 (RFC 8707)
- OAuth 2.0 Incremental Authorization (draft-ietf-oauth-incremental-authz)
- The OAuth 2.0 Authorization Framework: JWT Secured Authorization Request (JAR) (RFC 9101)
- Financial-grade API: JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)
- OAuth 2.0 Demonstrating Proof-of-Possession at the Application Layer (DPoP) (RFC 9449)
- OpenID Connect Federation 1.0
- OpenID Connect for Identity Assurance 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for constructing OpenID Connect authentication requests. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe purpose string parameter maximum length.static final intThe purpose string parameter minimal length.Fields inherited from class com.nimbusds.oauth2.sdk.AuthorizationRequest
prompt -
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationRequest(URI endpoint, ResponseType rt, ResponseMode rm, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce, Display display, Prompt prompt, int maxAge, List<com.nimbusds.langtag.LangTag> uiLocales, List<com.nimbusds.langtag.LangTag> claimsLocales, com.nimbusds.jwt.JWT idTokenHint, String loginHint, List<ACR> acrValues, ClaimsRequest claims, String purpose, com.nimbusds.jwt.JWT requestObject, URI requestURI, CodeChallenge codeChallenge, CodeChallengeMethod codeChallengeMethod, List<URI> resources, boolean includeGrantedScopes, Map<String, List<String>> customParams) Deprecated.AuthenticationRequest(URI endpoint, ResponseType rt, ResponseMode rm, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce, Display display, Prompt prompt, int maxAge, List<com.nimbusds.langtag.LangTag> uiLocales, List<com.nimbusds.langtag.LangTag> claimsLocales, com.nimbusds.jwt.JWT idTokenHint, String loginHint, List<ACR> acrValues, OIDCClaimsRequest claims, String purpose, com.nimbusds.jwt.JWT requestObject, URI requestURI, CodeChallenge codeChallenge, CodeChallengeMethod codeChallengeMethod, List<URI> resources, boolean includeGrantedScopes, Map<String, List<String>> customParams) Deprecated.AuthenticationRequest(URI endpoint, ResponseType rt, ResponseMode rm, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce, Display display, Prompt prompt, JWKThumbprintConfirmation dpopJKT, int maxAge, List<com.nimbusds.langtag.LangTag> uiLocales, List<com.nimbusds.langtag.LangTag> claimsLocales, com.nimbusds.jwt.JWT idTokenHint, String loginHint, List<ACR> acrValues, OIDCClaimsRequest claims, String purpose, com.nimbusds.jwt.JWT requestObject, URI requestURI, CodeChallenge codeChallenge, CodeChallengeMethod codeChallengeMethod, List<URI> resources, boolean includeGrantedScopes, Map<String, List<String>> customParams) Deprecated.AuthenticationRequest(URI endpoint, ResponseType rt, ResponseMode rm, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce, Display display, Prompt prompt, JWKThumbprintConfirmation dpopJKT, TrustChain trustChain, int maxAge, List<com.nimbusds.langtag.LangTag> uiLocales, List<com.nimbusds.langtag.LangTag> claimsLocales, com.nimbusds.jwt.JWT idTokenHint, String loginHint, List<ACR> acrValues, OIDCClaimsRequest claims, String purpose, com.nimbusds.jwt.JWT requestObject, URI requestURI, CodeChallenge codeChallenge, CodeChallengeMethod codeChallengeMethod, List<AuthorizationDetail> authorizationDetails, List<URI> resources, boolean includeGrantedScopes, Map<String, List<String>> customParams) Creates a new OpenID Connect authentication request with extension and custom parameters.AuthenticationRequest(URI endpoint, ResponseType rt, ResponseMode rm, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce, Display display, Prompt prompt, JWKThumbprintConfirmation dpopJKT, TrustChain trustChain, int maxAge, List<com.nimbusds.langtag.LangTag> uiLocales, List<com.nimbusds.langtag.LangTag> claimsLocales, com.nimbusds.jwt.JWT idTokenHint, String loginHint, List<ACR> acrValues, OIDCClaimsRequest claims, String purpose, com.nimbusds.jwt.JWT requestObject, URI requestURI, CodeChallenge codeChallenge, CodeChallengeMethod codeChallengeMethod, List<URI> resources, boolean includeGrantedScopes, Map<String, List<String>> customParams) Deprecated.AuthenticationRequest(URI endpoint, ResponseType rt, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce) Creates a new minimal OpenID Connect authentication request. -
Method Summary
Modifier and TypeMethodDescriptionReturns the requested Authentication Context Class Reference values.Deprecated.List<com.nimbusds.langtag.LangTag>Returns the end-user's preferred languages and scripts for the claims being returned, ordered by preference.Returns the requested display type.com.nimbusds.jwt.JWTReturns the ID Token hint.Returns the login hint.intReturns the required maximum authentication age.getNonce()Returns the nonce.Returns the individual OpenID claims to be returned.Returns the transaction specific purpose.Returns the registered (standard) OpenID Connect authentication request parameter names.List<com.nimbusds.langtag.LangTag>Returns the end-user's preferred languages and scripts for the user interface, ordered by preference.static AuthenticationRequestparse(HTTPRequest httpRequest) Parses an authentication request from the specified HTTP GET or POST request.static AuthenticationRequestParses an OpenID Connect authentication request from the specified URI query string.static AuthenticationRequestParses an OpenID Connect authentication request from the specified URI.static AuthenticationRequestParses an OpenID Connect authentication request from the specified URI query string.static AuthenticationRequestParses an OpenID Connect authentication request from the specified URI and query parameters.static AuthenticationRequestParses an OpenID Connect authentication request from the specified URI query parameters.com.nimbusds.jwt.JWTClaimsSetReturns the parameters for this authorisation request as a JSON Web Token (JWT) claims set.Returns the URI query parameters for this authorisation request.Methods inherited from class com.nimbusds.oauth2.sdk.AuthorizationRequest
getAuthorizationDetails, getClientID, getCodeChallenge, getCodeChallengeMethod, getCustomParameter, getCustomParameters, getDPoPJWKThumbprintConfirmation, getPrompt, getRedirectionURI, getRequestObject, getRequestURI, getResources, getResponseMode, getResponseType, getScope, getState, getTrustChain, impliedResponseMode, includeGrantedScopes, specifiesRequestObject, toHTTPRequest, toHTTPRequest, toQueryString, toURIMethods inherited from class com.nimbusds.oauth2.sdk.AbstractRequest
getEndpointURI
-
Field Details
-
PURPOSE_MIN_LENGTH
The purpose string parameter minimal length.- See Also:
-
PURPOSE_MAX_LENGTH
The purpose string parameter maximum length.- See Also:
-
-
Constructor Details
-
AuthenticationRequest
public AuthenticationRequest(URI endpoint, ResponseType rt, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce) Creates a new minimal OpenID Connect authentication request.- Parameters:
endpoint- The URI of the authorisation endpoint. May benullif the request is not going to be serialised.rt- The response type. Corresponds to theresponse_typeparameter. Must specify a valid OpenID Connect response type. Must not benull.scope- The request scope. Corresponds to thescopeparameter. Must contain anopenid value. Must not benull.clientID- The client identifier. Corresponds to theclient_idparameter. Must not benull.redirectURI- The redirection URI. Corresponds to theredirect_uriparameter. Must not benull.state- The state. Corresponds to thestateparameter. May benull.nonce- The nonce. Corresponds to thenonceparameter. May benullfor code flow.
-
AuthenticationRequest
@Deprecated public AuthenticationRequest(URI endpoint, ResponseType rt, ResponseMode rm, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce, Display display, Prompt prompt, int maxAge, List<com.nimbusds.langtag.LangTag> uiLocales, List<com.nimbusds.langtag.LangTag> claimsLocales, com.nimbusds.jwt.JWT idTokenHint, String loginHint, List<ACR> acrValues, ClaimsRequest claims, String purpose, com.nimbusds.jwt.JWT requestObject, URI requestURI, CodeChallenge codeChallenge, CodeChallengeMethod codeChallengeMethod, List<URI> resources, boolean includeGrantedScopes, Map<String, List<String>> customParams) Deprecated.Creates a new OpenID Connect authentication request with extension and custom parameters.- Parameters:
endpoint- The URI of the authorisation endpoint. May benullif the request is not going to be serialised.rt- The response type set. Corresponds to theresponse_typeparameter. Must specify a valid OpenID Connect response type. Must not benull.rm- The response mode. Corresponds to the optionalresponse_modeparameter. Use of this parameter is not recommended unless a non-default response mode is requested (e.g. form_post).scope- The request scope. Corresponds to thescopeparameter. Must contain anopenid value. Must not benull.clientID- The client identifier. Corresponds to theclient_idparameter. Must not benull.redirectURI- The redirection URI. Corresponds to theredirect_uriparameter. Must not benullunless set by means of the optionalrequest_object/request_uriparameter.state- The state. Corresponds to the recommendedstateparameter.nullif not specified.nonce- The nonce. Corresponds to thenonceparameter. May benullfor code flow.display- The requested display type. Corresponds to the optionaldisplayparameter.nullif not specified.prompt- The requested prompt. Corresponds to the optionalpromptparameter.nullif not specified.maxAge- The required maximum authentication age, in seconds. Corresponds to the optionalmax_ageparameter. -1 if not specified, zero impliesprompt=login.uiLocales- The preferred languages and scripts for the user interface. Corresponds to the optionalui_localesparameter.nullif not specified.claimsLocales- The preferred languages and scripts for claims being returned. Corresponds to the optionalclaims_localesparameter.nullif not specified.idTokenHint- The ID Token hint. Corresponds to the optionalid_token_hintparameter.nullif not specified.loginHint- The login hint. Corresponds to the optionallogin_hintparameter.nullif not specified.acrValues- The requested Authentication Context Class Reference values. Corresponds to the optionalacr_valuesparameter.nullif not specified.claims- The individual claims to be returned. Corresponds to the optionalclaimsparameter.nullif not specified.purpose- The transaction specific purpose,nullif not specified.requestObject- The request object. Corresponds to the optionalrequestparameter. Must not be specified together with a request object URI.nullif not specified.requestURI- The request object URI. Corresponds to the optionalrequest_uriparameter. Must not be specified together with a request object.nullif not specified.codeChallenge- The code challenge for PKCE,nullif not specified.codeChallengeMethod- The code challenge method for PKCE,nullif not specified.resources- The resource URI(s),nullif not specified.includeGrantedScopes-trueto request incremental authorisation.customParams- Additional custom parameters, empty map ornullif none.
-
AuthenticationRequest
@Deprecated public AuthenticationRequest(URI endpoint, ResponseType rt, ResponseMode rm, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce, Display display, Prompt prompt, int maxAge, List<com.nimbusds.langtag.LangTag> uiLocales, List<com.nimbusds.langtag.LangTag> claimsLocales, com.nimbusds.jwt.JWT idTokenHint, String loginHint, List<ACR> acrValues, OIDCClaimsRequest claims, String purpose, com.nimbusds.jwt.JWT requestObject, URI requestURI, CodeChallenge codeChallenge, CodeChallengeMethod codeChallengeMethod, List<URI> resources, boolean includeGrantedScopes, Map<String, List<String>> customParams) Deprecated.Creates a new OpenID Connect authentication request with extension and custom parameters.- Parameters:
endpoint- The URI of the authorisation endpoint. May benullif the request is not going to be serialised.rt- The response type set. Corresponds to theresponse_typeparameter. Must specify a valid OpenID Connect response type. Must not benull.rm- The response mode. Corresponds to the optionalresponse_modeparameter. Use of this parameter is not recommended unless a non-default response mode is requested (e.g. form_post).scope- The request scope. Corresponds to thescopeparameter. Must contain anopenid value. Must not benull.clientID- The client identifier. Corresponds to theclient_idparameter. Must not benull.redirectURI- The redirection URI. Corresponds to theredirect_uriparameter. Must not benullunless set by means of the optionalrequest_object/request_uriparameter.state- The state. Corresponds to the recommendedstateparameter.nullif not specified.nonce- The nonce. Corresponds to thenonceparameter. May benullfor code flow.display- The requested display type. Corresponds to the optionaldisplayparameter.nullif not specified.prompt- The requested prompt. Corresponds to the optionalpromptparameter.nullif not specified.maxAge- The required maximum authentication age, in seconds. Corresponds to the optionalmax_ageparameter. -1 if not specified, zero impliesprompt=login.uiLocales- The preferred languages and scripts for the user interface. Corresponds to the optionalui_localesparameter.nullif not specified.claimsLocales- The preferred languages and scripts for claims being returned. Corresponds to the optionalclaims_localesparameter.nullif not specified.idTokenHint- The ID Token hint. Corresponds to the optionalid_token_hintparameter.nullif not specified.loginHint- The login hint. Corresponds to the optionallogin_hintparameter.nullif not specified.acrValues- The requested Authentication Context Class Reference values. Corresponds to the optionalacr_valuesparameter.nullif not specified.claims- The individual OpenID claims to be returned. Corresponds to the optionalclaimsparameter.nullif not specified.purpose- The transaction specific purpose,nullif not specified.requestObject- The request object. Corresponds to the optionalrequestparameter. Must not be specified together with a request object URI.nullif not specified.requestURI- The request object URI. Corresponds to the optionalrequest_uriparameter. Must not be specified together with a request object.nullif not specified.codeChallenge- The code challenge for PKCE,nullif not specified.codeChallengeMethod- The code challenge method for PKCE,nullif not specified.resources- The resource URI(s),nullif not specified.includeGrantedScopes-trueto request incremental authorisation.customParams- Additional custom parameters, empty map ornullif none.
-
AuthenticationRequest
@Deprecated public AuthenticationRequest(URI endpoint, ResponseType rt, ResponseMode rm, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce, Display display, Prompt prompt, JWKThumbprintConfirmation dpopJKT, int maxAge, List<com.nimbusds.langtag.LangTag> uiLocales, List<com.nimbusds.langtag.LangTag> claimsLocales, com.nimbusds.jwt.JWT idTokenHint, String loginHint, List<ACR> acrValues, OIDCClaimsRequest claims, String purpose, com.nimbusds.jwt.JWT requestObject, URI requestURI, CodeChallenge codeChallenge, CodeChallengeMethod codeChallengeMethod, List<URI> resources, boolean includeGrantedScopes, Map<String, List<String>> customParams) Deprecated.Creates a new OpenID Connect authentication request with extension and custom parameters.- Parameters:
endpoint- The URI of the authorisation endpoint. May benullif the request is not going to be serialised.rt- The response type set. Corresponds to theresponse_typeparameter. Must specify a valid OpenID Connect response type. Must not benull.rm- The response mode. Corresponds to the optionalresponse_modeparameter. Use of this parameter is not recommended unless a non-default response mode is requested (e.g. form_post).scope- The request scope. Corresponds to thescopeparameter. Must contain anopenid value. Must not benull.clientID- The client identifier. Corresponds to theclient_idparameter. Must not benull.redirectURI- The redirection URI. Corresponds to theredirect_uriparameter. Must not benullunless set by means of the optionalrequest_object/request_uriparameter.state- The state. Corresponds to the recommendedstateparameter.nullif not specified.nonce- The nonce. Corresponds to thenonceparameter. May benullfor code flow.display- The requested display type. Corresponds to the optionaldisplayparameter.nullif not specified.prompt- The requested prompt. Corresponds to the optionalpromptparameter.nullif not specified.dpopJKT- The DPoP JWK SHA-256 thumbprint,nullif not specified.maxAge- The required maximum authentication age, in seconds. Corresponds to the optionalmax_ageparameter. -1 if not specified, zero impliesprompt=login.uiLocales- The preferred languages and scripts for the user interface. Corresponds to the optionalui_localesparameter.nullif not specified.claimsLocales- The preferred languages and scripts for claims being returned. Corresponds to the optionalclaims_localesparameter.nullif not specified.idTokenHint- The ID Token hint. Corresponds to the optionalid_token_hintparameter.nullif not specified.loginHint- The login hint. Corresponds to the optionallogin_hintparameter.nullif not specified.acrValues- The requested Authentication Context Class Reference values. Corresponds to the optionalacr_valuesparameter.nullif not specified.claims- The individual OpenID claims to be returned. Corresponds to the optionalclaimsparameter.nullif not specified.purpose- The transaction specific purpose,nullif not specified.requestObject- The request object. Corresponds to the optionalrequestparameter. Must not be specified together with a request object URI.nullif not specified.requestURI- The request object URI. Corresponds to the optionalrequest_uriparameter. Must not be specified together with a request object.nullif not specified.codeChallenge- The code challenge for PKCE,nullif not specified.codeChallengeMethod- The code challenge method for PKCE,nullif not specified.resources- The resource URI(s),nullif not specified.includeGrantedScopes-trueto request incremental authorisation.customParams- Additional custom parameters, empty map ornullif none.
-
AuthenticationRequest
@Deprecated public AuthenticationRequest(URI endpoint, ResponseType rt, ResponseMode rm, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce, Display display, Prompt prompt, JWKThumbprintConfirmation dpopJKT, TrustChain trustChain, int maxAge, List<com.nimbusds.langtag.LangTag> uiLocales, List<com.nimbusds.langtag.LangTag> claimsLocales, com.nimbusds.jwt.JWT idTokenHint, String loginHint, List<ACR> acrValues, OIDCClaimsRequest claims, String purpose, com.nimbusds.jwt.JWT requestObject, URI requestURI, CodeChallenge codeChallenge, CodeChallengeMethod codeChallengeMethod, List<URI> resources, boolean includeGrantedScopes, Map<String, List<String>> customParams) Deprecated.Creates a new OpenID Connect authentication request with extension and custom parameters.- Parameters:
endpoint- The URI of the authorisation endpoint. May benullif the request is not going to be serialised.rt- The response type set. Corresponds to theresponse_typeparameter. Must specify a valid OpenID Connect response type. Must not benull.rm- The response mode. Corresponds to the optionalresponse_modeparameter. Use of this parameter is not recommended unless a non-default response mode is requested (e.g. form_post).scope- The request scope. Corresponds to thescopeparameter. Must contain anopenid value. Must not benull.clientID- The client identifier. Corresponds to theclient_idparameter. Must not benull.redirectURI- The redirection URI. Corresponds to theredirect_uriparameter. Must not benullunless set by means of the optionalrequest_object/request_uriparameter.state- The state. Corresponds to the recommendedstateparameter.nullif not specified.nonce- The nonce. Corresponds to thenonceparameter. May benullfor code flow.display- The requested display type. Corresponds to the optionaldisplayparameter.nullif not specified.prompt- The requested prompt. Corresponds to the optionalpromptparameter.nullif not specified.dpopJKT- The DPoP JWK SHA-256 thumbprint,nullif not specified.trustChain- The OpenID Connect Federation 1.0 trust chain,nullif not specified.maxAge- The required maximum authentication age, in seconds. Corresponds to the optionalmax_ageparameter. -1 if not specified, zero impliesprompt=login.uiLocales- The preferred languages and scripts for the user interface. Corresponds to the optionalui_localesparameter.nullif not specified.claimsLocales- The preferred languages and scripts for claims being returned. Corresponds to the optionalclaims_localesparameter.nullif not specified.idTokenHint- The ID Token hint. Corresponds to the optionalid_token_hintparameter.nullif not specified.loginHint- The login hint. Corresponds to the optionallogin_hintparameter.nullif not specified.acrValues- The requested Authentication Context Class Reference values. Corresponds to the optionalacr_valuesparameter.nullif not specified.claims- The individual OpenID claims to be returned. Corresponds to the optionalclaimsparameter.nullif not specified.purpose- The transaction specific purpose,nullif not specified.requestObject- The request object. Corresponds to the optionalrequestparameter. Must not be specified together with a request object URI.nullif not specified.requestURI- The request object URI. Corresponds to the optionalrequest_uriparameter. Must not be specified together with a request object.nullif not specified.codeChallenge- The code challenge for PKCE,nullif not specified.codeChallengeMethod- The code challenge method for PKCE,nullif not specified.resources- The resource URI(s),nullif not specified.includeGrantedScopes-trueto request incremental authorisation.customParams- Additional custom parameters, empty map ornullif none.
-
AuthenticationRequest
public AuthenticationRequest(URI endpoint, ResponseType rt, ResponseMode rm, Scope scope, ClientID clientID, URI redirectURI, State state, Nonce nonce, Display display, Prompt prompt, JWKThumbprintConfirmation dpopJKT, TrustChain trustChain, int maxAge, List<com.nimbusds.langtag.LangTag> uiLocales, List<com.nimbusds.langtag.LangTag> claimsLocales, com.nimbusds.jwt.JWT idTokenHint, String loginHint, List<ACR> acrValues, OIDCClaimsRequest claims, String purpose, com.nimbusds.jwt.JWT requestObject, URI requestURI, CodeChallenge codeChallenge, CodeChallengeMethod codeChallengeMethod, List<AuthorizationDetail> authorizationDetails, List<URI> resources, boolean includeGrantedScopes, Map<String, List<String>> customParams) Creates a new OpenID Connect authentication request with extension and custom parameters.- Parameters:
endpoint- The URI of the authorisation endpoint. May benullif the request is not going to be serialised.rt- The response type set. Corresponds to theresponse_typeparameter. Must specify a valid OpenID Connect response type. Must not benull.rm- The response mode. Corresponds to the optionalresponse_modeparameter. Use of this parameter is not recommended unless a non-default response mode is requested (e.g. form_post).scope- The request scope. Corresponds to thescopeparameter. Must contain anopenid value. Must not benull.clientID- The client identifier. Corresponds to theclient_idparameter. Must not benull.redirectURI- The redirection URI. Corresponds to theredirect_uriparameter. Must not benullunless set by means of the optionalrequest_object/request_uriparameter.state- The state. Corresponds to the recommendedstateparameter.nullif not specified.nonce- The nonce. Corresponds to thenonceparameter. May benullfor code flow.display- The requested display type. Corresponds to the optionaldisplayparameter.nullif not specified.prompt- The requested prompt. Corresponds to the optionalpromptparameter.nullif not specified.dpopJKT- The DPoP JWK SHA-256 thumbprint,nullif not specified.trustChain- The OpenID Connect Federation 1.0 trust chain,nullif not specified.maxAge- The required maximum authentication age, in seconds. Corresponds to the optionalmax_ageparameter. -1 if not specified, zero impliesprompt=login.uiLocales- The preferred languages and scripts for the user interface. Corresponds to the optionalui_localesparameter.nullif not specified.claimsLocales- The preferred languages and scripts for claims being returned. Corresponds to the optionalclaims_localesparameter.nullif not specified.idTokenHint- The ID Token hint. Corresponds to the optionalid_token_hintparameter.nullif not specified.loginHint- The login hint. Corresponds to the optionallogin_hintparameter.nullif not specified.acrValues- The requested Authentication Context Class Reference values. Corresponds to the optionalacr_valuesparameter.nullif not specified.claims- The individual OpenID claims to be returned. Corresponds to the optionalclaimsparameter.nullif not specified.purpose- The transaction specific purpose,nullif not specified.requestObject- The request object. Corresponds to the optionalrequestparameter. Must not be specified together with a request object URI.nullif not specified.requestURI- The request object URI. Corresponds to the optionalrequest_uriparameter. Must not be specified together with a request object.nullif not specified.codeChallenge- The code challenge for PKCE,nullif not specified.codeChallengeMethod- The code challenge method for PKCE,nullif not specified.authorizationDetails- The authorisation details,nullif not specified.resources- The resource URI(s),nullif not specified.includeGrantedScopes-trueto request incremental authorisation.customParams- Additional custom parameters, empty map ornullif none.
-
-
Method Details
-
getRegisteredParameterNames
Returns the registered (standard) OpenID Connect authentication request parameter names.- Returns:
- The registered OpenID Connect authentication request parameter names, as a unmodifiable set.
-
getNonce
Returns the nonce. Corresponds to the conditionally optionalnonceparameter.- Returns:
- The nonce,
nullif not specified.
-
getDisplay
Returns the requested display type. Corresponds to the optionaldisplayparameter.- Returns:
- The requested display type,
nullif not specified.
-
getMaxAge
Returns the required maximum authentication age. Corresponds to the optionalmax_ageparameter.- Returns:
- The maximum authentication age, in seconds; -1 if not
specified, zero implies
prompt=login.
-
getUILocales
Returns the end-user's preferred languages and scripts for the user interface, ordered by preference. Corresponds to the optionalui_localesparameter.- Returns:
- The preferred UI locales,
nullif not specified.
-
getClaimsLocales
Returns the end-user's preferred languages and scripts for the claims being returned, ordered by preference. Corresponds to the optionalclaims_localesparameter.- Returns:
- The preferred claims locales,
nullif not specified.
-
getIDTokenHint
Returns the ID Token hint. Corresponds to the conditionally optionalid_token_hintparameter.- Returns:
- The ID Token hint,
nullif not specified.
-
getLoginHint
Returns the login hint. Corresponds to the optionallogin_hintparameter.- Returns:
- The login hint,
nullif not specified.
-
getACRValues
Returns the requested Authentication Context Class Reference values. Corresponds to the optionalacr_valuesparameter.- Returns:
- The requested ACR values,
nullif not specified.
-
getClaims
Deprecated.Returns the individual claims to be returned. Corresponds to the optionalclaimsparameter.- Returns:
- The individual claims to be returned,
nullif not specified. - See Also:
-
getOIDCClaims
Returns the individual OpenID claims to be returned. Corresponds to the optionalclaimsparameter.- Returns:
- The individual claims to be returned,
nullif not specified.
-
getPurpose
Returns the transaction specific purpose. Corresponds to the optionalpurposeparameter.- Returns:
- The purpose,
nullif not specified.
-
toParameters
Description copied from class:AuthorizationRequestReturns the URI query parameters for this authorisation request. Query parameters which are part of the authorisation endpoint are not included.Example parameters:
response_type = code client_id = s6BhdRkqt3 state = xyz redirect_uri = https://client.example.com/cb
- Overrides:
toParametersin classAuthorizationRequest- Returns:
- The parameters.
-
toJWTClaimsSet
Description copied from class:AuthorizationRequestReturns the parameters for this authorisation request as a JSON Web Token (JWT) claims set. Intended for creating a request object.- Overrides:
toJWTClaimsSetin classAuthorizationRequest- Returns:
- The parameters as JWT claim set.
-
parse
Parses an OpenID Connect authentication request from the specified URI query parameters.Example parameters:
response_type = token id_token client_id = s6BhdRkqt3 redirect_uri = https://client.example.com/cb scope = openid profile state = af0ifjsldkj nonce = -0S6_WzA2Mj
- Parameters:
params- The parameters. Must not benull.- Returns:
- The OpenID Connect authentication request.
- Throws:
ParseException- If the parameters couldn't be parsed to an OpenID Connect authentication request.
-
parse
public static AuthenticationRequest parse(URI uri, Map<String, List<String>> params) throws ParseExceptionParses an OpenID Connect authentication request from the specified URI and query parameters.Example parameters:
response_type = token id_token client_id = s6BhdRkqt3 redirect_uri = https://client.example.com/cb scope = openid profile state = af0ifjsldkj nonce = -0S6_WzA2Mj
- Parameters:
uri- The URI of the OAuth 2.0 authorisation endpoint. May benullif theAuthorizationRequest.toHTTPRequest(com.nimbusds.oauth2.sdk.http.HTTPRequest.Method)method will not be used.params- The parameters. Must not benull.- Returns:
- The OpenID Connect authentication request.
- Throws:
ParseException- If the parameters couldn't be parsed to an OpenID Connect authentication request.
-
parse
Parses an OpenID Connect authentication request from the specified URI query string.Example URI query string:
response_type=token%20id_token &client_id=s6BhdRkqt3 &redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb &scope=openid%20profile &state=af0ifjsldkj &nonce=n-0S6_WzA2Mj
- Parameters:
query- The URI query string. Must not benull.- Returns:
- The OpenID Connect authentication request.
- Throws:
ParseException- If the query string couldn't be parsed to an OpenID Connect authentication request.
-
parse
Parses an OpenID Connect authentication request from the specified URI query string.Example URI query string:
response_type=token%20id_token &client_id=s6BhdRkqt3 &redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb &scope=openid%20profile &state=af0ifjsldkj &nonce=n-0S6_WzA2Mj
- Parameters:
uri- The URI of the OAuth 2.0 authorisation endpoint. May benullif theAuthorizationRequest.toHTTPRequest(com.nimbusds.oauth2.sdk.http.HTTPRequest.Method)method will not be used.query- The URI query string. Must not benull.- Returns:
- The OpenID Connect authentication request.
- Throws:
ParseException- If the query string couldn't be parsed to an OpenID Connect authentication request.
-
parse
Parses an OpenID Connect authentication request from the specified URI.Example URI:
https://server.example.com/authorize? response_type=token%20id_token &client_id=s6BhdRkqt3 &redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb &scope=openid%20profile &state=af0ifjsldkj &nonce=n-0S6_WzA2Mj
- Parameters:
uri- The URI. Must not benull.- Returns:
- The OpenID Connect authentication request.
- Throws:
ParseException- If the query string couldn't be parsed to an OpenID Connect authentication request.
-
parse
Parses an authentication request from the specified HTTP GET or POST request.Example HTTP request (GET):
https://server.example.com/op/authorize? response_type=code%20id_token &client_id=s6BhdRkqt3 &redirect_uri=https%3A%2F%2Fclient.example.com%2Fcb &scope=openid &nonce=n-0S6_WzA2Mj &state=af0ifjsldkj
- Parameters:
httpRequest- The HTTP request. Must not benull.- Returns:
- The OpenID Connect authentication request.
- Throws:
ParseException- If the HTTP request couldn't be parsed to an OpenID Connect authentication request.
-