Class AuthorizationDecisionHandler.Params
- java.lang.Object
-
- com.authlete.jaxrs.AuthorizationDecisionHandler.Params
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- AuthorizationDecisionHandler
public static class AuthorizationDecisionHandler.Params extends Object implements Serializable
Parameters for this handler.- Since:
- 2.25
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Params()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AuthorizationDecisionHandler.Paramsfrom(com.authlete.common.dto.AuthorizationResponse response)Create aAuthorizationDecisionHandler.Paramsinstance from an instance ofAuthorizationResponse.String[]getClaimLocales()Get the requested claim locales.String[]getClaimNames()Get the names of requested claims.StringgetIdTokenClaims()Get the value of theid_tokenproperty in theclaimsrequest parameter.String[]getRequestedClaimsForTx()Get the claims that are indirectly requested by transformed claims.com.authlete.common.dto.StringArray[]getRequestedVerifiedClaimsForTx()Get the verified claims that are indirectly requested by transformed claims.StringgetTicket()Get the ticket that was issued by Authlete's/api/auth/authorizationAPI.booleanisOldIdaFormatUsed()Get the flag indicating whetherAuthorizationDecisionHandleruses the old format of"verified_claims"defined in the Implementer's Draft 2 of OpenID Connect for Identity Assurance 1.0 which was published on May 19, 2020.AuthorizationDecisionHandler.ParamssetClaimLocales(String[] locales)Set the requested claim locales.AuthorizationDecisionHandler.ParamssetClaimNames(String[] names)Set the names of requested claims.AuthorizationDecisionHandler.ParamssetIdTokenClaims(String claims)Set the value of theid_tokenproperty in theclaimsrequest parameter.AuthorizationDecisionHandler.ParamssetOldIdaFormatUsed(boolean used)Set the flag indicating whetherAuthorizationDecisionHandleruses the old format of"verified_claims"defined in the Implementer's Draft 2 of OpenID Connect for Identity Assurance 1.0 which was published on May 19, 2020.AuthorizationDecisionHandler.ParamssetRequestedClaimsForTx(String[] claims)Set the claims that are indirectly requested by transformed claims.AuthorizationDecisionHandler.ParamssetRequestedVerifiedClaimsForTx(com.authlete.common.dto.StringArray[] claims)Set the verified claims that are indirectly requested by transformed claims.AuthorizationDecisionHandler.ParamssetTicket(String ticket)Set the ticket that was issued by Authlete's/api/auth/authorizationAPI.
-
-
-
Method Detail
-
getTicket
public String getTicket()
Get the ticket that was issued by Authlete's/api/auth/authorizationAPI.- Returns:
- The ticket that was issued by Authlete's
/api/auth/authorizationAPI.
-
setTicket
public AuthorizationDecisionHandler.Params setTicket(String ticket)
Set the ticket that was issued by Authlete's/api/auth/authorizationAPI.- Parameters:
ticket- The ticket that was issued by Authlete's/api/auth/authorizationAPI.- Returns:
thisobject.
-
getClaimNames
public String[] getClaimNames()
Get the names of requested claims.- Returns:
- The names of requested claims.
-
setClaimNames
public AuthorizationDecisionHandler.Params setClaimNames(String[] names)
Set the names of requested claims. The value given to this method should be the value of theclaimsparameter in a response from Authlete's/api/auth/authorizationAPI.- Parameters:
names- The names of requested claims.- Returns:
thisobject.
-
getClaimLocales
public String[] getClaimLocales()
Get the requested claim locales.- Returns:
- Requested claim locales.
-
setClaimLocales
public AuthorizationDecisionHandler.Params setClaimLocales(String[] locales)
Set the requested claim locales. The value given to this method should be the value of theclaimsLocalesparameter in a response from Authlete's/api/auth/authorizationAPI.- Parameters:
locales- Requested claim locales.- Returns:
thisobject.
-
getIdTokenClaims
public String getIdTokenClaims()
Get the value of theid_tokenproperty in theclaimsrequest parameter.- Returns:
- Claims requested for an ID token.
-
setIdTokenClaims
public AuthorizationDecisionHandler.Params setIdTokenClaims(String claims)
Set the value of theid_tokenproperty in theclaimsrequest parameter. The value given to this method should be the value of theidTokenClaimsparameter in a response from Authlete's/api/auth/authorizationAPI.- Parameters:
claims- Claims requested for an ID token.- Returns:
thisobject.
-
getRequestedClaimsForTx
public String[] getRequestedClaimsForTx()
Get the claims that are indirectly requested by transformed claims.- Returns:
- Claims requested by transformed claims.
- Since:
- 2.41
- See Also:
- OpenID Connect Advanced Syntax for Claims (ASC) 1.0
-
setRequestedClaimsForTx
public AuthorizationDecisionHandler.Params setRequestedClaimsForTx(String[] claims)
Set the claims that are indirectly requested by transformed claims. The value given to this method should be the value of therequestedClaimsForTxparameter in a response from Authlete's/api/auth/authorizationAPI.- Parameters:
claims- Claims requested by transformed claims.- Returns:
thisobject.- Since:
- 2.41
- See Also:
- OpenID Connect Advanced Syntax for Claims (ASC) 1.0
-
getRequestedVerifiedClaimsForTx
public com.authlete.common.dto.StringArray[] getRequestedVerifiedClaimsForTx()
Get the verified claims that are indirectly requested by transformed claims.See the JavaDoc of the getRequestedVerifiedClaimsForTx() method of AuthorizationResponse class for details about the format of the return value.
- Returns:
- Verified claims requested by transformed claims.
- Since:
- 2.43
- See Also:
- OpenID Connect Advanced Syntax for Claims (ASC) 1.0,
AuthorizationResponse.getRequestedClaimsForTx()
-
setRequestedVerifiedClaimsForTx
public AuthorizationDecisionHandler.Params setRequestedVerifiedClaimsForTx(com.authlete.common.dto.StringArray[] claims)
Set the verified claims that are indirectly requested by transformed claims. The value given to this method should be the value of therequestedVerifiedClaimsForTxparameter in a response from Authlete's/api/auth/authorizationAPI.See the JavaDoc of the getRequestedVerifiedClaimsForTx() method of AuthorizationResponse class for details about the format of the argument.
- Parameters:
claims- Verified claims requested by transformed claims.- Returns:
thisobject.- Since:
- 2.43
- See Also:
- OpenID Connect Advanced Syntax for Claims (ASC) 1.0,
AuthorizationResponse.getRequestedClaimsForTx()
-
isOldIdaFormatUsed
public boolean isOldIdaFormatUsed()
Get the flag indicating whetherAuthorizationDecisionHandleruses the old format of"verified_claims"defined in the Implementer's Draft 2 of OpenID Connect for Identity Assurance 1.0 which was published on May 19, 2020.When this flag is on,
AuthorizationDecisionHandlercalls thegetVerifiedClaims(String, VerifiedClaimsConstraint)method ofAuthorizationDecisionHandlerSpi. On the other hand, if this flag is off, thegetVerifiedClaims(String, Object)method is called instead. This is a breaking change from authlete-java-jaxrs version 2.41. This flag exists to mitigate the breaking change.The Implementer's Draft 3 of OpenID Connect for Identity Assurance 1.0, which was published on September 6, 2021, made many breaking changes. In addition, it is certain that further breaking changes will be made in the next draft. Considering the instability of the specification, it is not a good approach to define Java classes that correspond to elements in
"verified_claims". Thecom.authlete.common.assurancepackage in the authlete-java-common library was developed based on the approach for the Implementer's Draft 2, but it is not useful any more. This is the reason thegetVerifiedClaims(String, VerifiedClaimsConstraint)method (whose second argument is an instance ofVerifiedClaimsConstraintwhich is defined in thecom.authlete.common.assurance.constraintpackage) was marked as deprecated.- Returns:
trueifAuthorizationDecisionHandlercallsgetVerifiedClaims(String, VerifiedClaimsConstraint)method ofAuthorizationDecisionHandlerSpi.falseifAuthorizationDecisionHandlercallsgetVerifiedClaims(String, Object)method instead.- Since:
- 2.42
- See Also:
- OpenID Connect for Identity Assurance 1.0
-
setOldIdaFormatUsed
public AuthorizationDecisionHandler.Params setOldIdaFormatUsed(boolean used)
Set the flag indicating whetherAuthorizationDecisionHandleruses the old format of"verified_claims"defined in the Implementer's Draft 2 of OpenID Connect for Identity Assurance 1.0 which was published on May 19, 2020.When this flag is on,
AuthorizationDecisionHandlercalls thegetVerifiedClaims(String, VerifiedClaimsConstraint)method ofAuthorizationDecisionHandlerSpi. On the other hand, if this flag is off, thegetVerifiedClaims(String, Object)method is called instead. This is a breaking change from authlete-java-jaxrs version 2.41. This flag exists to mitigate the breaking change.The Implementer's Draft 3 of OpenID Connect for Identity Assurance 1.0, which was published on September 6, 2021, made many breaking changes. In addition, it is certain that further breaking changes will be made in the next draft. Considering the instability of the specification, it is not a good approach to define Java classes that correspond to elements in
"verified_claims". Thecom.authlete.common.assurancepackage in the authlete-java-common library was developed based on the approach for the Implementer's Draft 2, but it is not useful any more. This is the reason thegetVerifiedClaims(String, VerifiedClaimsConstraint)method (whose second argument is an instance ofVerifiedClaimsConstraintwhich is defined in thecom.authlete.common.assurance.constraintpackage) was marked as deprecated.- Parameters:
used-trueto makeAuthorizationDecisionHandlercallgetVerifiedClaims(String, VerifiedClaimsConstraint)method ofAuthorizationDecisionHandlerSpi.falseto makeAuthorizationDecisionHandlercallgetVerifiedClaims(String, Object)method instead.- Returns:
thisobject.- Since:
- 2.42
- See Also:
- OpenID Connect for Identity Assurance 1.0
-
from
public static AuthorizationDecisionHandler.Params from(com.authlete.common.dto.AuthorizationResponse response)
Create aAuthorizationDecisionHandler.Paramsinstance from an instance ofAuthorizationResponse.- Parameters:
response- An response from Authlete's/api/auth/authorizationAPI.- Returns:
- A new
Paramsinstance built from the response.
-
-