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.Params
from(com.authlete.common.dto.AuthorizationResponse response)
Create aAuthorizationDecisionHandler.Params
instance from an instance ofAuthorizationResponse
.String[]
getClaimLocales()
Get the requested claim locales.String[]
getClaimNames()
Get the names of requested claims.String
getIdTokenClaims()
Get the value of theid_token
property in theclaims
request 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.String
getTicket()
Get the ticket that was issued by Authlete's/api/auth/authorization
API.boolean
isOldIdaFormatUsed()
Get the flag indicating whetherAuthorizationDecisionHandler
uses 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.Params
setClaimLocales(String[] locales)
Set the requested claim locales.AuthorizationDecisionHandler.Params
setClaimNames(String[] names)
Set the names of requested claims.AuthorizationDecisionHandler.Params
setIdTokenClaims(String claims)
Set the value of theid_token
property in theclaims
request parameter.AuthorizationDecisionHandler.Params
setOldIdaFormatUsed(boolean used)
Set the flag indicating whetherAuthorizationDecisionHandler
uses 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.Params
setRequestedClaimsForTx(String[] claims)
Set the claims that are indirectly requested by transformed claims.AuthorizationDecisionHandler.Params
setRequestedVerifiedClaimsForTx(com.authlete.common.dto.StringArray[] claims)
Set the verified claims that are indirectly requested by transformed claims.AuthorizationDecisionHandler.Params
setTicket(String ticket)
Set the ticket that was issued by Authlete's/api/auth/authorization
API.
-
-
-
Method Detail
-
getTicket
public String getTicket()
Get the ticket that was issued by Authlete's/api/auth/authorization
API.- Returns:
- The ticket that was issued by Authlete's
/api/auth/authorization
API.
-
setTicket
public AuthorizationDecisionHandler.Params setTicket(String ticket)
Set the ticket that was issued by Authlete's/api/auth/authorization
API.- Parameters:
ticket
- The ticket that was issued by Authlete's/api/auth/authorization
API.- Returns:
this
object.
-
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 theclaims
parameter in a response from Authlete's/api/auth/authorization
API.- Parameters:
names
- The names of requested claims.- Returns:
this
object.
-
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 theclaimsLocales
parameter in a response from Authlete's/api/auth/authorization
API.- Parameters:
locales
- Requested claim locales.- Returns:
this
object.
-
getIdTokenClaims
public String getIdTokenClaims()
Get the value of theid_token
property in theclaims
request parameter.- Returns:
- Claims requested for an ID token.
-
setIdTokenClaims
public AuthorizationDecisionHandler.Params setIdTokenClaims(String claims)
Set the value of theid_token
property in theclaims
request parameter. The value given to this method should be the value of theidTokenClaims
parameter in a response from Authlete's/api/auth/authorization
API.- Parameters:
claims
- Claims requested for an ID token.- Returns:
this
object.
-
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 therequestedClaimsForTx
parameter in a response from Authlete's/api/auth/authorization
API.- Parameters:
claims
- Claims requested by transformed claims.- Returns:
this
object.- 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 therequestedVerifiedClaimsForTx
parameter in a response from Authlete's/api/auth/authorization
API.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:
this
object.- Since:
- 2.43
- See Also:
- OpenID Connect Advanced Syntax for Claims (ASC) 1.0,
AuthorizationResponse.getRequestedClaimsForTx()
-
isOldIdaFormatUsed
public boolean isOldIdaFormatUsed()
Get the flag indicating whetherAuthorizationDecisionHandler
uses 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,
AuthorizationDecisionHandler
calls 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.assurance
package 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 ofVerifiedClaimsConstraint
which is defined in thecom.authlete.common.assurance.constraint
package) was marked as deprecated.- Returns:
true
ifAuthorizationDecisionHandler
callsgetVerifiedClaims(String, VerifiedClaimsConstraint)
method ofAuthorizationDecisionHandlerSpi
.false
ifAuthorizationDecisionHandler
callsgetVerifiedClaims(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 whetherAuthorizationDecisionHandler
uses 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,
AuthorizationDecisionHandler
calls 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.assurance
package 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 ofVerifiedClaimsConstraint
which is defined in thecom.authlete.common.assurance.constraint
package) was marked as deprecated.- Parameters:
used
-true
to makeAuthorizationDecisionHandler
callgetVerifiedClaims(String, VerifiedClaimsConstraint)
method ofAuthorizationDecisionHandlerSpi
.false
to makeAuthorizationDecisionHandler
callgetVerifiedClaims(String, Object)
method instead.- Returns:
this
object.- 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.Params
instance from an instance ofAuthorizationResponse
.- Parameters:
response
- An response from Authlete's/api/auth/authorization
API.- Returns:
- A new
Params
instance built from the response.
-
-