Package com.nimbusds.oauth2.sdk.ciba
Class CIBARequest.Builder
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.ciba.CIBARequest.Builder
-
- Enclosing class:
- CIBARequest
public static class CIBARequest.Builder extends Object
Builder for constructing CIBA requests.
-
-
Constructor Summary
Constructors Constructor Description Builder(ClientAuthentication clientAuth, com.nimbusds.jwt.SignedJWT signedRequest)Creates a new CIBA signed request builder.Builder(ClientAuthentication clientAuth, Scope scope)Creates a new CIBA request builder.Builder(CIBARequest request)Creates a new CIBA request builder from the specified request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CIBARequest.BuilderacrValues(List<ACR> acrValues)Sets the requested Authentication Context Class Reference values.CIBARequest.BuilderbindingMessage(String bindingMessage)Sets the human readable binding message for the display at the consumption and authentication devices.CIBARequestbuild()Builds a new CIBA request.CIBARequest.BuilderclientNotificationToken(BearerAccessToken token)Sets the client notification token, required for the CIBA ping and push token delivery modes.CIBARequest.BuildercustomParameter(String name, String... values)Sets a custom parameter.CIBARequest.BuilderendpointURI(URI uri)Sets the URI of the endpoint (HTTP or HTTPS) for which the request is intended.CIBARequest.BuilderidTokenHint(com.nimbusds.jwt.JWT idTokenHint)Sets the ID Token hint, passed as a hint to identify the end-user for whom authentication is being requested.CIBARequest.BuilderloginHint(String loginHint)Sets the login hint (email address, phone number, etc), about the end-user for whom authentication is being requested.CIBARequest.BuilderloginHintTokenString(String loginHintTokenString)Sets the login hint token string, containing information identifying the end-user for whom authentication is being requested.CIBARequest.BuilderrequestedExpiry(Integer requestedExpiry)Sets the requested expiration for theauth_req_id.CIBARequest.BuilderuserCode(Secret userCode)Gets the user secret code (password, PIN, etc) to authorise the CIBA request with the authentication device.
-
-
-
Constructor Detail
-
Builder
public Builder(ClientAuthentication clientAuth, Scope scope)
Creates a new CIBA request builder.- Parameters:
clientAuth- The client authentication. Must not benull.scope- The requested scope. Must not be empty ornull.
-
Builder
public Builder(ClientAuthentication clientAuth, com.nimbusds.jwt.SignedJWT signedRequest)
Creates a new CIBA signed request builder.- Parameters:
clientAuth- The client authentication. Must not benull.signedRequest- The signed request JWT. Must not benull.
-
Builder
public Builder(CIBARequest request)
Creates a new CIBA request builder from the specified request.- Parameters:
request- The CIBA request. Must not benull.
-
-
Method Detail
-
clientNotificationToken
public CIBARequest.Builder clientNotificationToken(BearerAccessToken token)
Sets the client notification token, required for the CIBA ping and push token delivery modes. Corresponds to theclient_notification_tokenparameter.- Parameters:
token- The client notification token,nullif not specified.- Returns:
- This builder.
-
acrValues
public CIBARequest.Builder acrValues(List<ACR> acrValues)
Sets the requested Authentication Context Class Reference values. Corresponds to the optionalacr_valuesparameter.- Parameters:
acrValues- The requested ACR values,nullif not specified.- Returns:
- This builder.
-
loginHintTokenString
public CIBARequest.Builder loginHintTokenString(String loginHintTokenString)
Sets the login hint token string, containing information identifying the end-user for whom authentication is being requested. Corresponds to thelogin_hint_tokenparameter.- Parameters:
loginHintTokenString- The login hint token string,nullif not specified.- Returns:
- This builder.
-
idTokenHint
public CIBARequest.Builder idTokenHint(com.nimbusds.jwt.JWT idTokenHint)
Sets the ID Token hint, passed as a hint to identify the end-user for whom authentication is being requested. Corresponds to theid_token_hintparameter.- Parameters:
idTokenHint- The ID Token hint,nullif not specified.- Returns:
- This builder.
-
loginHint
public CIBARequest.Builder loginHint(String loginHint)
Sets the login hint (email address, phone number, etc), about the end-user for whom authentication is being requested. Corresponds to thelogin_hintparameter.- Parameters:
loginHint- The login hint,nullif not specified.- Returns:
- This builder.
-
bindingMessage
public CIBARequest.Builder bindingMessage(String bindingMessage)
Sets the human readable binding message for the display at the consumption and authentication devices. Corresponds to thebinding_messageparameter.- Parameters:
bindingMessage- The binding message,nullif not specified.- Returns:
- This builder.
-
userCode
public CIBARequest.Builder userCode(Secret userCode)
Gets the user secret code (password, PIN, etc) to authorise the CIBA request with the authentication device. Corresponds to theuser_codeparameter.- Parameters:
userCode- The user code,nullif not specified.- Returns:
- This builder.
-
requestedExpiry
public CIBARequest.Builder requestedExpiry(Integer requestedExpiry)
Sets the requested expiration for theauth_req_id. Corresponds to therequested_expiryparameter.- Parameters:
requestedExpiry- The required expiry (as positive integer),nullif not specified.
-
customParameter
public CIBARequest.Builder customParameter(String name, String... values)
Sets a custom parameter.- Parameters:
name- The parameter name. Must not benull.values- The parameter values,nullif not specified.- Returns:
- This builder.
-
endpointURI
public CIBARequest.Builder endpointURI(URI uri)
Sets the URI of the endpoint (HTTP or HTTPS) for which the request is intended.- Parameters:
uri- The endpoint URI,nullif not specified.- Returns:
- This builder.
-
build
public CIBARequest build()
Builds a new CIBA request.- Returns:
- The CIBA request.
-
-