Package com.nimbusds.oauth2.sdk.ciba
Class CIBARequest
java.lang.Object
com.nimbusds.oauth2.sdk.AbstractRequest
com.nimbusds.oauth2.sdk.AbstractAuthenticatedRequest
com.nimbusds.oauth2.sdk.ciba.CIBARequest
CIBA request to an OpenID provider / OAuth 2.0 authorisation server backend authentication endpoint. Supports plan as well as signed (JWT) requests.
Example HTTP request:
POST /bc-authorize HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded scope=openid%20email%20example-scope& client_notification_token=8d67dc78-7faa-4d41-aabd-67707b374255& binding_message=W4SCT& login_hint_token=eyJraWQiOiJsdGFjZXNidyIsImFsZyI6IkVTMjU2In0.eyJ zdWJfaWQiOnsic3ViamVjdF90eXBlIjoicGhvbmUiLCJwaG9uZSI6IisxMzMwMjg xODAwNCJ9fQ.Kk8jcUbHjJAQkRSHyDuFQr3NMEOSJEZc85VfER74tX6J9CuUllr8 9WKUHUR7MA0-mWlptMRRhdgW1ZDt7g1uwQ& client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3A client-assertion-type%3Ajwt-bearer& client_assertion=eyJraWQiOiJsdGFjZXNidyIsImFsZyI6IkVTMjU2In0.eyJ pc3MiOiJzNkJoZFJrcXQzIiwic3ViIjoiczZCaGRSa3F0MyIsImF1ZCI6Imh0dHB zOi8vc2VydmVyLmV4YW1wbGUuY29tIiwianRpIjoiYmRjLVhzX3NmLTNZTW80RlN 6SUoyUSIsImlhdCI6MTUzNzgxOTQ4NiwiZXhwIjoxNTM3ODE5Nzc3fQ.Ybr8mg_3 E2OptOSsA8rnelYO_y1L-yFaF_j1iemM3ntB61_GN3APe5cl_-5a6cvGlP154XAK 7fL-GaZSdnd9kg
Related specifications:
- OpenID Connect CIBA Flow - Core 1.0
- Financial-grade API: Client Initiated Backchannel Authentication Profile (draft 02)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for constructing CIBA requests. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum allowed length of a client notification token. -
Constructor Summary
ConstructorsConstructorDescriptionCIBARequest(URI endpoint, ClientAuthentication clientAuth, com.nimbusds.jwt.SignedJWT signedRequest) Creates a new CIBA signed request.CIBARequest(URI endpoint, ClientAuthentication clientAuth, Scope scope, BearerAccessToken clientNotificationToken, List<ACR> acrValues, LoginHintToken loginHintToken, com.nimbusds.jwt.JWT idTokenHint, String loginHint, String bindingMessage, Secret userCode, Integer requestedExpiry, OIDCClaimsRequest claims, List<com.nimbusds.langtag.LangTag> claimsLocales, String purpose, List<AuthorizationDetail> authorizationDetails, List<URI> resources, net.minidev.json.JSONObject requestContext, Map<String, List<String>> customParams) Creates a new CIBA request.CIBARequest(URI endpoint, ClientAuthentication clientAuth, Scope scope, BearerAccessToken clientNotificationToken, List<ACR> acrValues, String loginHintTokenString, com.nimbusds.jwt.JWT idTokenHint, String loginHint, String bindingMessage, Secret userCode, Integer requestedExpiry, OIDCClaimsRequest claims, List<com.nimbusds.langtag.LangTag> claimsLocales, String purpose, List<AuthorizationDetail> authorizationDetails, List<URI> resources, Map<String, List<String>> customParams) Deprecated.CIBARequest(URI endpoint, ClientAuthentication clientAuth, Scope scope, BearerAccessToken clientNotificationToken, List<ACR> acrValues, String loginHintTokenString, com.nimbusds.jwt.JWT idTokenHint, String loginHint, String bindingMessage, Secret userCode, Integer requestedExpiry, OIDCClaimsRequest claims, List<com.nimbusds.langtag.LangTag> claimsLocales, String purpose, List<URI> resources, Map<String, List<String>> customParams) Deprecated.CIBARequest(URI endpoint, ClientAuthentication clientAuth, Scope scope, BearerAccessToken clientNotificationToken, List<ACR> acrValues, String loginHintTokenString, com.nimbusds.jwt.JWT idTokenHint, String loginHint, String bindingMessage, Secret userCode, Integer requestedExpiry, OIDCClaimsRequest claims, Map<String, List<String>> customParams) Deprecated.CIBARequest(URI endpoint, ClientAuthentication clientAuth, Scope scope, BearerAccessToken clientNotificationToken, List<ACR> acrValues, String loginHintTokenString, com.nimbusds.jwt.JWT idTokenHint, String loginHint, String bindingMessage, Secret userCode, Integer requestedExpiry, Map<String, List<String>> customParams) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionReturns the requested Authentication Context Class Reference values.Returns the Rich Authorisation Request (RAR) details.Returns the human-readable binding message for the display at the consumption and authentication devices.List<com.nimbusds.langtag.LangTag>Returns the end-user's preferred languages and scripts for the claims being returned, ordered by preference.Returns the client notification token, required for the CIBA ping and push token delivery modes.net.minidev.json.JSONObjectReturns the request context.getCustomParameter(String name) Returns the specified custom parameter.Returns the additional custom parameters.Returns the hint type.com.nimbusds.jwt.JWTReturns the ID Token hint, passed as a hint to identify the end-user for whom authentication is being requested.Returns the login hint (email address, phone number, etc), about the end-user for whom authentication is being requested.Returns the login hint token, containing information identifying the end-user for whom authentication is being requested.Deprecated.Returns the individual claims to be returned.Returns the transaction specific purpose.Returns the registered (standard) CIBA request parameter names.Returns the requested expiration for theauth_req_id.com.nimbusds.jwt.SignedJWTReturns the JWT for a signed request.Returns the resource server URI.getScope()Returns the scope.Returns the user secret code (password, PIN, etc.) to authorise the CIBA request with the authentication device.booleanisSigned()Returnstrueif this request is signed.static CIBARequestparse(HTTPRequest httpRequest) Parses a CIBA request from the specified HTTP request.Returns the matching HTTP request.com.nimbusds.jwt.JWTClaimsSetReturns the parameters for this CIBA request as a JSON Web Token (JWT) claims set.Returns the for parameters for this CIBA request.Methods inherited from class com.nimbusds.oauth2.sdk.AbstractAuthenticatedRequest
getClientAuthenticationMethods inherited from class com.nimbusds.oauth2.sdk.AbstractRequest
getEndpointURI
-
Field Details
-
CLIENT_NOTIFICATION_TOKEN_MAX_LENGTH
The maximum allowed length of a client notification token.- See Also:
-
-
Constructor Details
-
CIBARequest
@Deprecated public CIBARequest(URI endpoint, ClientAuthentication clientAuth, Scope scope, BearerAccessToken clientNotificationToken, List<ACR> acrValues, String loginHintTokenString, com.nimbusds.jwt.JWT idTokenHint, String loginHint, String bindingMessage, Secret userCode, Integer requestedExpiry, Map<String, List<String>> customParams) Deprecated.Creates a new CIBA request.- Parameters:
endpoint- The URI of the CIBA endpoint. May benullif thetoHTTPRequest()method is not going to be used.clientAuth- The client authentication. Must not benull.scope- The requested scope. Must not be empty ornull.clientNotificationToken- The client notification token,nullif not specified.acrValues- The requested ACR values,nullif not specified.loginHintTokenString- The login hint token string,nullif not specified.idTokenHint- The ID Token hint,nullif not specified.loginHint- The login hint,nullif not specified.bindingMessage- The binding message,nullif not specified.userCode- The user code,nullif not specified.requestedExpiry- The required expiry (as positive integer),nullif not specified.customParams- Custom parameters, empty ornullif not specified.
-
CIBARequest
@Deprecated public CIBARequest(URI endpoint, ClientAuthentication clientAuth, Scope scope, BearerAccessToken clientNotificationToken, List<ACR> acrValues, String loginHintTokenString, com.nimbusds.jwt.JWT idTokenHint, String loginHint, String bindingMessage, Secret userCode, Integer requestedExpiry, OIDCClaimsRequest claims, Map<String, List<String>> customParams) Deprecated.Creates a new CIBA request.- Parameters:
endpoint- The URI of the CIBA endpoint. May benullif thetoHTTPRequest()method is not going to be used.clientAuth- The client authentication. Must not benull.scope- The requested scope. Must not be empty ornull.clientNotificationToken- The client notification token,nullif not specified.acrValues- The requested ACR values,nullif not specified.loginHintTokenString- The login hint token string,nullif not specified.idTokenHint- The ID Token hint,nullif not specified.loginHint- The login hint,nullif not specified.bindingMessage- The binding message,nullif not specified.userCode- The user code,nullif not specified.requestedExpiry- The required expiry (as positive integer),nullif not specified.claims- The individual claims to be returned,nullif not specified.customParams- Custom parameters, empty ornullif not specified.
-
CIBARequest
@Deprecated public CIBARequest(URI endpoint, ClientAuthentication clientAuth, Scope scope, BearerAccessToken clientNotificationToken, List<ACR> acrValues, String loginHintTokenString, com.nimbusds.jwt.JWT idTokenHint, String loginHint, String bindingMessage, Secret userCode, Integer requestedExpiry, OIDCClaimsRequest claims, List<com.nimbusds.langtag.LangTag> claimsLocales, String purpose, List<URI> resources, Map<String, List<String>> customParams) Deprecated.Creates a new CIBA request.- Parameters:
endpoint- The URI of the CIBA endpoint. May benullif thetoHTTPRequest()method is not going to be used.clientAuth- The client authentication. Must not benull.scope- The requested scope. Must not be empty ornull.clientNotificationToken- The client notification token,nullif not specified.acrValues- The requested ACR values,nullif not specified.loginHintTokenString- The login hint token string,nullif not specified.idTokenHint- The ID Token hint,nullif not specified.loginHint- The login hint,nullif not specified.bindingMessage- The binding message,nullif not specified.userCode- The user code,nullif not specified.requestedExpiry- The required expiry (as positive integer),nullif not specified.claims- The individual claims to be returned,nullif not specified.claimsLocales- The preferred languages and scripts for claims being returned,nullif not specified.purpose- The transaction specific purpose,nullif not specified.resources- The resource URI(s),nullif not specified.customParams- Custom parameters, empty ornullif not specified.
-
CIBARequest
@Deprecated public CIBARequest(URI endpoint, ClientAuthentication clientAuth, Scope scope, BearerAccessToken clientNotificationToken, List<ACR> acrValues, String loginHintTokenString, com.nimbusds.jwt.JWT idTokenHint, String loginHint, String bindingMessage, Secret userCode, Integer requestedExpiry, OIDCClaimsRequest claims, List<com.nimbusds.langtag.LangTag> claimsLocales, String purpose, List<AuthorizationDetail> authorizationDetails, List<URI> resources, Map<String, List<String>> customParams) Deprecated.Creates a new CIBA request.- Parameters:
endpoint- The URI of the CIBA endpoint. May benullif thetoHTTPRequest()method is not going to be used.clientAuth- The client authentication. Must not benull.scope- The requested scope. Must not be empty ornull.clientNotificationToken- The client notification token,nullif not specified.acrValues- The requested ACR values,nullif not specified.loginHintTokenString- The login hint token string,nullif not specified.idTokenHint- The ID Token hint,nullif not specified.loginHint- The login hint,nullif not specified.bindingMessage- The binding message,nullif not specified.userCode- The user code,nullif not specified.requestedExpiry- The required expiry (as positive integer),nullif not specified.claims- The individual claims to be returned,nullif not specified.claimsLocales- The preferred languages and scripts for claims being returned,nullif not specified.purpose- The transaction specific purpose,nullif not specified.authorizationDetails- The Rich Authorisation Request (RAR) details,nullif not specified.resources- The resource URI(s),nullif not specified.customParams- Custom parameters, empty ornullif not specified.
-
CIBARequest
public CIBARequest(URI endpoint, ClientAuthentication clientAuth, Scope scope, BearerAccessToken clientNotificationToken, List<ACR> acrValues, LoginHintToken loginHintToken, com.nimbusds.jwt.JWT idTokenHint, String loginHint, String bindingMessage, Secret userCode, Integer requestedExpiry, OIDCClaimsRequest claims, List<com.nimbusds.langtag.LangTag> claimsLocales, String purpose, List<AuthorizationDetail> authorizationDetails, List<URI> resources, net.minidev.json.JSONObject requestContext, Map<String, List<String>> customParams) Creates a new CIBA request.- Parameters:
endpoint- The URI of the CIBA endpoint. May benullif thetoHTTPRequest()method is not going to be used.clientAuth- The client authentication. Must not benull.scope- The requested scope. Must not be empty ornull.clientNotificationToken- The client notification token,nullif not specified.acrValues- The requested ACR values,nullif not specified.loginHintToken- The login hint token,nullif not specified.idTokenHint- The ID Token hint,nullif not specified.loginHint- The login hint,nullif not specified.bindingMessage- The binding message,nullif not specified.userCode- The user code,nullif not specified.requestedExpiry- The required expiry (as positive integer),nullif not specified.claims- The individual claims to be returned,nullif not specified.claimsLocales- The preferred languages and scripts for claims being returned,nullif not specified.purpose- The transaction specific purpose,nullif not specified.authorizationDetails- The Rich Authorisation Request (RAR) details,nullif not specified.resources- The resource URI(s),nullif not specified.requestContext- The request context,nullif not specified.customParams- Custom parameters, empty ornullif not specified.
-
CIBARequest
public CIBARequest(URI endpoint, ClientAuthentication clientAuth, com.nimbusds.jwt.SignedJWT signedRequest) Creates a new CIBA signed request.- Parameters:
endpoint- The URI of the CIBA endpoint. May benullif thetoHTTPRequest()method is not going to be used.clientAuth- The client authentication. Must not benull.signedRequest- The signed request JWT. Must not benull.
-
-
Method Details
-
getRegisteredParameterNames
Returns the registered (standard) CIBA request parameter names.- Returns:
- The registered CIBA request parameter names, as an unmodifiable set.
-
getScope
Returns the scope. Corresponds to the optionalscopeparameter.- Returns:
- The scope,
nullif not specified.
-
getClientNotificationToken
Returns the client notification token, required for the CIBA ping and push token delivery modes. Corresponds to theclient_notification_tokenparameter.- Returns:
- The client notification token,
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.
-
getHintType
Returns the hint type.- Returns:
- The hint type.
-
getLoginHintToken
Returns the login hint token, containing information identifying the end-user for whom authentication is being requested. Corresponds to thelogin_hint_tokenparameter.- Returns:
- The login hint token,
nullif not specified.
-
getLoginHintTokenString
Deprecated.Returns the login hint token string, containing information identifying the end-user for whom authentication is being requested. Corresponds to thelogin_hint_tokenparameter.- Returns:
- The login hint token string,
nullif not specified.
-
getIDTokenHint
Returns the ID Token hint, passed as a hint to identify the end-user for whom authentication is being requested. Corresponds to theid_token_hintparameter.- Returns:
- The ID Token hint,
nullif not specified.
-
getLoginHint
Returns the login hint (email address, phone number, etc), about the end-user for whom authentication is being requested. Corresponds to thelogin_hintparameter.- Returns:
- The login hint,
nullif not specified.
-
getBindingMessage
Returns the human-readable binding message for the display at the consumption and authentication devices. Corresponds to thebinding_messageparameter.- Returns:
- The binding message,
nullif not specified.
-
getUserCode
Returns the user secret code (password, PIN, etc.) to authorise the CIBA request with the authentication device. Corresponds to theuser_codeparameter.- Returns:
- The user code,
nullif not specified.
-
getRequestedExpiry
Returns the requested expiration for theauth_req_id. Corresponds to therequested_expiryparameter.- Returns:
- The required expiry (as positive integer),
nullif not specified.
-
getOIDCClaims
Returns the individual claims to be returned. Corresponds to the optionalclaimsparameter.- Returns:
- The individual claims to be returned,
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.
-
getPurpose
Returns the transaction specific purpose. Corresponds to the optionalpurposeparameter.- Returns:
- The purpose,
nullif not specified.
-
getAuthorizationDetails
Returns the Rich Authorisation Request (RAR) details.- Returns:
- The authorisation details,
nullif not specified.
-
getResources
Returns the resource server URI.- Returns:
- The resource URI(s),
nullif not specified.
-
getContext
Returns the request context.- Returns:
- The request context,
nullif not specified.
-
getCustomParameters
Returns the additional custom parameters.- Returns:
- The additional custom parameters as an unmodifiable map, empty map if none.
-
getCustomParameter
Returns the specified custom parameter.- Parameters:
name- The parameter name. Must not benull.- Returns:
- The parameter value(s),
nullif not specified.
-
isSigned
Returnstrueif this request is signed.- Returns:
truefor a signed request,falsefor a plain request.
-
getRequestJWT
Returns the JWT for a signed request.- Returns:
- The request JWT.
-
toParameters
Returns the for parameters for this CIBA request. Parameters which are part of the client authentication are not included.- Returns:
- The parameters.
-
toJWTClaimsSet
Returns the parameters for this CIBA request as a JSON Web Token (JWT) claims set. Intended for creating a signed CIBA request.- Returns:
- The parameters as JWT claim set.
-
toHTTPRequest
Returns the matching HTTP request.- Returns:
- The HTTP request.
-
parse
Parses a CIBA request from the specified HTTP request.- Parameters:
httpRequest- The HTTP request. Must not benull.- Returns:
- The CIBA request.
- Throws:
ParseException- If parsing failed.
-