Class ACRRequest
java.lang.Object
com.nimbusds.openid.connect.sdk.op.ACRRequest
Resolved authentication Context Class Reference (ACR) request.
-
Constructor Summary
ConstructorsConstructorDescriptionACRRequest(List<ACR> essentialACRs, List<ACR> voluntaryACRs) Creates a new Authentication Context Class Reference (ACR) request. -
Method Summary
Modifier and TypeMethodDescriptionapplyDefaultACRs(OIDCClientInformation clientInfo) Applies the registered default ACR values for the requesting client (as a voluntary ACR value, provided no ACR values were explicitly requested).voidensureACRSupport(AuthorizationRequest authzRequest, List<ACR> supportedACRs) Ensures all requested essential ACR values are supported by those supported by the OpenID provider.voidensureACRSupport(AuthenticationRequest authRequest, OIDCProviderMetadata opMetadata) Deprecated.Gets the requested essential ACR values.Gets the requested voluntary ACR values.booleanisEmpty()Checks if this ACR request has no essential or voluntary values specified.static ACRRequestresolve(AuthorizationRequest authzRequest) Resolves the requested essential and voluntary ACR values from the specified OAuth 2.0 authorisation request / OpenID authentication request.static ACRRequestresolve(CIBARequest cibaRequest) Resolves the requested essential and voluntary ACR values from the specified CIBA request.static ACRRequestresolve(List<ACR> acrValues, OIDCClaimsRequest claimsRequest) Resolves the requested essential and voluntary ACR values from the specified top-levelacr_valuesrequest parameter andclaimsrequest parameter.
-
Constructor Details
-
ACRRequest
Creates a new Authentication Context Class Reference (ACR) request.- Parameters:
essentialACRs- The requested essential ACR values, by order of preference,nullif not specified.voluntaryACRs- The requested voluntary ACR values, by order of preference,nullif not specified.
-
-
Method Details
-
getEssentialACRs
Gets the requested essential ACR values.- Returns:
- The essential ACR values, by order of preference,
nullif not specified.
-
getVoluntaryACRs
Gets the requested voluntary ACR values.- Returns:
- The voluntary ACR values, by order of preference,
nullif not specified.
-
isEmpty
Checks if this ACR request has no essential or voluntary values specified.- Returns:
trueif this ACR request doesn't specify any essential or voluntary values, elsefalse.
-
applyDefaultACRs
Applies the registered default ACR values for the requesting client (as a voluntary ACR value, provided no ACR values were explicitly requested).- Parameters:
clientInfo- The registered client information. Must not benull.- Returns:
- The ACR request, updated if registered default ACR values were applied.
-
ensureACRSupport
public void ensureACRSupport(AuthorizationRequest authzRequest, List<ACR> supportedACRs) throws GeneralException Ensures all requested essential ACR values are supported by those supported by the OpenID provider.- Parameters:
authzRequest- The OAuth 2.0 authorisation request / OpenID authentication request. Must not benull.supportedACRs- The ACR values supported by the OpenID provider,nullif not specified.- Throws:
GeneralException- If a requested essential ACR value is not supported by the OpenID provider.
-
ensureACRSupport
@Deprecated public void ensureACRSupport(AuthenticationRequest authRequest, OIDCProviderMetadata opMetadata) throws GeneralException Deprecated.Ensures all requested essential ACR values are supported by the OpenID provider.- Parameters:
authRequest- The OpenID authentication request. Must not benull.opMetadata- The OpenID provider metadata. Must not benull.- Throws:
GeneralException- If a requested essential ACR value is not supported by the OpenID provider.
-
resolve
Resolves the requested essential and voluntary ACR values from the specified OAuth 2.0 authorisation request / OpenID authentication request.- Parameters:
authzRequest- The OAuth 2.0 authorisation request / OpenID authentication request. Should be resolved. Must not benull.- Returns:
- The resolved ACR request.
-
resolve
Resolves the requested essential and voluntary ACR values from the specified CIBA request.- Parameters:
cibaRequest- The CIBA request. Must be resolved and notnull.- Returns:
- The resolved ACR request.
-
resolve
Resolves the requested essential and voluntary ACR values from the specified top-levelacr_valuesrequest parameter andclaimsrequest parameter.- Parameters:
acrValues- The top-levelacr_valuesrequest parameter,nullif not specified.claimsRequest- The OpenIDclaimsrequest parameter,nullif not specified.- Returns:
- The resolved ACR request.
-