Class AuthorizationPageModel
- java.lang.Object
- 
- com.authlete.jaxrs.AuthorizationPageModel
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class AuthorizationPageModel extends Object implements Serializable Model class to hold data which are referred to in an authorization page.Feel free to extend this class as necessary. - Author:
- Takahiko Kawasaki
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description AuthorizationPageModel()The default constructor with default values.AuthorizationPageModel(com.authlete.common.dto.AuthorizationResponse info, com.authlete.common.types.User user)Create anAuthorizationPageModelinstance using information contained in anAuthorizationResponseobject, which represents a response from Authlete's/api/auth/authorizationAPI.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthorizationDetails()Get the content of theauthorization_detailsrequest parameter in JSON format.String[]getClaimsForIdToken()Get the claims that the client application requests to be embedded in the ID token.String[]getClaimsForUserInfo()Get the claims that the client application requests to be embedded in userinfo responses.StringgetClientName()Get the name of the client application.StringgetClientUri()Get the URL of the homepage of the client application.StringgetDescription()Get the description of the client application.StringgetLoginId()Get the login ID which should be set to the login ID field in the authorization page as the initial value.StringgetLoginIdReadOnly()Return"readonly"if the initial value of the login ID should not be changed.StringgetLogoUri()Get the URL of the logo image of the client application.StringgetPolicyUri()Get the URL of the policy page of the client application.StringgetPurpose()Get the value of thepurposerequest parameter.com.authlete.common.dto.Scope[]getScopes()Get the list of scopes requested by the authorization request.StringgetServiceName()Get the name of the service.StringgetTosUri()Get the URL of "Terms of Service" page of the client application.com.authlete.common.types.UsergetUser()Get the user.com.authlete.common.dto.Pair[]getVerifiedClaimsForIdToken()Get the verified claims requested for the ID token.com.authlete.common.dto.Pair[]getVerifiedClaimsForUserInfo()Get the verified claims requested for the userinfo.booleanisAllVerifiedClaimsForIdTokenRequested()Get the flag indicating whether the authorization request requests all possible verified claims for the ID token.booleanisAllVerifiedClaimsForUserInfoRequested()Get the flag indicating whether the authorization request requests all possible verified claims for the userinfo.booleanisIdentityAssuranceRequired()Get the flag indicating whether behaviors for Identity Assurance are required.booleanisOldIdaFormatUsed()Get the flag indicating whether the old format of"verified_claims"is used.voidsetAllVerifiedClaimsForIdTokenRequested(boolean requested)Set the flag indicating whether the authorization request requests all possible verified claims for the ID token.voidsetAllVerifiedClaimsForUserInfoRequested(boolean requested)Set the flag indicating whether the authorization request requests all possible verified claims for the userinfo.voidsetAuthorizationDetails(String details)Set the content of theauthorization_detailsrequest parameter in JSON format.voidsetClaimsForIdToken(String[] claims)Set the claims that the client application requests to be embedded in the ID token.voidsetClaimsForUserInfo(String[] claims)Set the claims that the client application requests to be embedded in userinfo responses.AuthorizationPageModelsetClientName(String clientName)Set the name of the client application.AuthorizationPageModelsetClientUri(String clientUri)Set the URL of the homepage of the client application.AuthorizationPageModelsetDescription(String description)Set the description of the client application.voidsetIdentityAssuranceRequired(boolean required)Get the flag indicating whether behaviors for Identity Assurance are required.AuthorizationPageModelsetLoginId(String loginId)Set the login ID which should be set to the login ID field in the authorization page as the initial value.AuthorizationPageModelsetLoginIdReadOnly(String loginIdReadOnly)Set the value returned fromgetLoginIdReadOnly().AuthorizationPageModelsetLogoUri(String logoUri)Set the URL of the logo image of the client application.voidsetOldIdaFormatUsed(boolean used)Set the flag indicating whether the old format of"verified_claims"is used.AuthorizationPageModelsetPolicyUri(String policyUri)Set the URL of the policy page of the client application.voidsetPurpose(String purpose)Set the value of thepurposerequest parameter.AuthorizationPageModelsetScopes(com.authlete.common.dto.Scope[] scopes)Set the list of scopes requested by the authorization request.AuthorizationPageModelsetServiceName(String serviceName)Set the name of the service.AuthorizationPageModelsetTosUri(String tosUri)Set the URL of "Terms of Service" page of the client application.voidsetUser(com.authlete.common.types.User user)Set the user.voidsetVerifiedClaimsForIdToken(com.authlete.common.dto.Pair[] verifiedClaims)Set the verified claims requested for the ID token.voidsetVerifiedClaimsForUserInfo(com.authlete.common.dto.Pair[] verifiedClaims)Set the verified claims requested for the userinfo.
 
- 
- 
- 
Constructor Detail- 
AuthorizationPageModelpublic AuthorizationPageModel() The default constructor with default values.
 - 
AuthorizationPageModelpublic AuthorizationPageModel(com.authlete.common.dto.AuthorizationResponse info, com.authlete.common.types.User user)Create anAuthorizationPageModelinstance using information contained in anAuthorizationResponseobject, which represents a response from Authlete's/api/auth/authorizationAPI.userparameter was added by version 2.1.- Parameters:
- info- An- AuthorizationResponseobject, which represents a response from Authlete's- /api/auth/authorizationAPI.
- user-
 
 
- 
 - 
Method Detail- 
getServiceNamepublic String getServiceName() Get the name of the service.- Returns:
- The name of the service.
 
 - 
setServiceNamepublic AuthorizationPageModel setServiceName(String serviceName) Set the name of the service.- Parameters:
- serviceName- The name of the service.
- Returns:
- thisobject.
 
 - 
getClientNamepublic String getClientName() Get the name of the client application.- Returns:
- The name of the client application.
 
 - 
setClientNamepublic AuthorizationPageModel setClientName(String clientName) Set the name of the client application.- Parameters:
- clientName- The name of the client application.
- Returns:
- thisobject.
 
 - 
getDescriptionpublic String getDescription() Get the description of the client application.- Returns:
- The description of the client application.
 
 - 
setDescriptionpublic AuthorizationPageModel setDescription(String description) Set the description of the client application.- Parameters:
- description- The description of the client application.
- Returns:
- thisobject.
 
 - 
getLogoUripublic String getLogoUri() Get the URL of the logo image of the client application.- Returns:
- The URL of the logo image of the client application.
 
 - 
setLogoUripublic AuthorizationPageModel setLogoUri(String logoUri) Set the URL of the logo image of the client application.- Parameters:
- logoUri- The URL of the logo image of the client application.
- Returns:
- thisobject.
 
 - 
getClientUripublic String getClientUri() Get the URL of the homepage of the client application.- Returns:
- The URL of the homepage of the client application.
 
 - 
setClientUripublic AuthorizationPageModel setClientUri(String clientUri) Set the URL of the homepage of the client application.- Parameters:
- clientUri- The URL of the homepage of the client application.
- Returns:
- thisobject.
 
 - 
getPolicyUripublic String getPolicyUri() Get the URL of the policy page of the client application.- Returns:
- The URL of the policy page of the client application.
 
 - 
setPolicyUripublic AuthorizationPageModel setPolicyUri(String policyUri) Set the URL of the policy page of the client application.- Parameters:
- policyUri- The URL of the policy page of the client application.
- Returns:
- thisobject.
 
 - 
getTosUripublic String getTosUri() Get the URL of "Terms of Service" page of the client application.- Returns:
- The URL of "Terms of Service" page of the client application.
 
 - 
setTosUripublic AuthorizationPageModel setTosUri(String tosUri) Set the URL of "Terms of Service" page of the client application.- Parameters:
- tosUri- The URL of "Terms of Service" page of the client application.
- Returns:
- thisobject.
 
 - 
getScopespublic com.authlete.common.dto.Scope[] getScopes() Get the list of scopes requested by the authorization request.- Returns:
- The list of requested scopes.
 
 - 
setScopespublic AuthorizationPageModel setScopes(com.authlete.common.dto.Scope[] scopes) Set the list of scopes requested by the authorization request.- Parameters:
- scopes- The list of requested scopes.
- Returns:
- thisobject.
 
 - 
getLoginIdpublic String getLoginId() Get the login ID which should be set to the login ID field in the authorization page as the initial value.- Returns:
- The initial value of the login ID.
 
 - 
setLoginIdpublic AuthorizationPageModel setLoginId(String loginId) Set the login ID which should be set to the login ID field in the authorization page as the initial value.- Parameters:
- loginId- The initial value of the login ID.
- Returns:
- thisobject.
 
 - 
getLoginIdReadOnlypublic String getLoginIdReadOnly() Return"readonly"if the initial value of the login ID should not be changed.- Returns:
- "readonly"if the initial value of the login ID should not be changed. Otherwise,- null.
 
 - 
setLoginIdReadOnlypublic AuthorizationPageModel setLoginIdReadOnly(String loginIdReadOnly) Set the value returned fromgetLoginIdReadOnly().- Parameters:
- loginIdReadOnly- Pass- "readonly"if the initial value of the login ID should not be changed. Otherwise, pass- null.
- Returns:
- thisobject.
 
 - 
getUserpublic com.authlete.common.types.User getUser() Get the user.- Returns:
- The user.
- Since:
- 2.1
 
 - 
setUserpublic void setUser(com.authlete.common.types.User user) Set the user.- Parameters:
- user- The user to set.
- Since:
- 2.1
 
 - 
getAuthorizationDetailspublic String getAuthorizationDetails() Get the content of theauthorization_detailsrequest parameter in JSON format. See "OAuth 2.0 Rich Authorization Requests" for details.- Returns:
- Authorization details in JSON format.
- Since:
- 2.23
 
 - 
setAuthorizationDetailspublic void setAuthorizationDetails(String details) Set the content of theauthorization_detailsrequest parameter in JSON format. See "OAuth 2.0 Rich Authorization Requests" for details.- Parameters:
- details- Authorization details in JSON format.
- Since:
- 2.23
 
 - 
getPurposepublic String getPurpose() Get the value of thepurposerequest parameter. See OpenID Connect for Identity Assurance 1.0, Transaction-specific Purpose for details.- Returns:
- The value of the purposerequest parameter.
- Since:
- 2.25
 
 - 
setPurposepublic void setPurpose(String purpose) Set the value of thepurposerequest parameter. See OpenID Connect for Identity Assurance 1.0, Transaction-specific Purpose for details.- Parameters:
- purpose- The value of the- purposerequest parameter.
- Since:
- 2.25
 
 - 
getVerifiedClaimsForIdTokenpublic com.authlete.common.dto.Pair[] getVerifiedClaimsForIdToken() Get the verified claims requested for the ID token.For example, when an authorization request contains a claimsrequest parameter whose content is as follow:{ "id_token":{ "verified_claims":{ "claims":{ "given_name":{ "essential":true, "purpose":"To make communication look more personal" }, "family_name":{ "essential":true }, "birthdate":{ "purpose":"To send you best wishes on your birthday" } } } } }, this method returns an array which contains the following elements.Index getKey()getValue()0 given_nameTo make communication look more personal1 family_name2 birthdateTo send you best wishes on your birthdayNote that the order of the elements is not assured. - Returns:
- Requested verified claims.
- Since:
- 2.26
 
 - 
setVerifiedClaimsForIdTokenpublic void setVerifiedClaimsForIdToken(com.authlete.common.dto.Pair[] verifiedClaims) Set the verified claims requested for the ID token.- Parameters:
- verifiedClaims- Requested verified claims.
- Since:
- 2.26
 
 - 
isAllVerifiedClaimsForIdTokenRequestedpublic boolean isAllVerifiedClaimsForIdTokenRequested() Get the flag indicating whether the authorization request requests all possible verified claims for the ID token.NOTE: In the version 1.0 of "OpenID Connect for Identity Assurance", "claims":nullmeans "a request for all possible Claims". However, this requirement will be dropped from the future version. Therefore, this method should not be used in the future. The relevant discussion can be found in Issue 1142.- Returns:
- trueif the authorization request requests all possible verified claims for the ID token.
- Since:
- 2.26
 
 - 
setAllVerifiedClaimsForIdTokenRequestedpublic void setAllVerifiedClaimsForIdTokenRequested(boolean requested) Set the flag indicating whether the authorization request requests all possible verified claims for the ID token.- Parameters:
- requested-- trueto indicate that the authorization request requests all possible verified claims for the ID token.
- Since:
- 2.26
 
 - 
getVerifiedClaimsForUserInfopublic com.authlete.common.dto.Pair[] getVerifiedClaimsForUserInfo() Get the verified claims requested for the userinfo.For example, when an authorization request contains a claimsrequest parameter whose content is as follow:{ "userinfo":{ "verified_claims":{ "claims":{ "given_name":{ "essential":true, "purpose":"To make communication look more personal" }, "family_name":{ "essential":true }, "birthdate":{ "purpose":"To send you best wishes on your birthday" } } } } }, this method returns an array which contains the following elements.Index getKey()getValue()0 given_nameTo make communication look more personal1 family_name2 birthdateTo send you best wishes on your birthdayNote that the order of the elements is not assured. - Returns:
- Pairs of claim name and its purpose.
- Since:
- 2.26
 
 - 
setVerifiedClaimsForUserInfopublic void setVerifiedClaimsForUserInfo(com.authlete.common.dto.Pair[] verifiedClaims) Set the verified claims requested for the userinfo.- Parameters:
- verifiedClaims- Requested verified claims.
- Since:
- 2.26
 
 - 
isAllVerifiedClaimsForUserInfoRequestedpublic boolean isAllVerifiedClaimsForUserInfoRequested() Get the flag indicating whether the authorization request requests all possible verified claims for the userinfo.NOTE: In the version 1.0 of "OpenID Connect for Identity Assurance", "claims":nullmeans "a request for all possible Claims". However, this requirement will be dropped from the future version. Therefore, this method should not be used in the future. The relevant discussion can be found in Issue 1142.- Returns:
- trueif the authorization request requests all possible verified claims for the userinfo.
- Since:
- 2.26
 
 - 
setAllVerifiedClaimsForUserInfoRequestedpublic void setAllVerifiedClaimsForUserInfoRequested(boolean requested) Set the flag indicating whether the authorization request requests all possible verified claims for the userinfo.- Parameters:
- requested-- trueto indicate that the authorization request requests all possible verified claims for the userinfo.
- Since:
- 2.26
 
 - 
isIdentityAssuranceRequiredpublic boolean isIdentityAssuranceRequired() Get the flag indicating whether behaviors for Identity Assurance are required.- Returns:
- trueif behaviors for Identity Assurance are required.
- Since:
- 2.26
 
 - 
setIdentityAssuranceRequiredpublic void setIdentityAssuranceRequired(boolean required) Get the flag indicating whether behaviors for Identity Assurance are required.- Parameters:
- required-- trueto indicate that behaviors for Identity Assurance are required.
- Since:
- 2.26
 
 - 
isOldIdaFormatUsedpublic boolean isOldIdaFormatUsed() Get the flag indicating whether the old format of"verified_claims"is used. "Old" here means the 2nd Implementer's Draft of OpenID Connect for Identity Assurance 1.0 which was published on May 19, 2020.The Implementer's Draft 3 of OpenID Connect for Identity Assurance 1.0, which was published on September 6, 2021, made many breaking changes. - Returns:
- trueif the old format of- "verified_claims"is used.
- Since:
- 2.42
- See Also:
- OpenID Connect for Identity Assurance 1.0
 
 - 
setOldIdaFormatUsedpublic void setOldIdaFormatUsed(boolean used) Set the flag indicating whether the old format of"verified_claims"is used. "Old" here means the 2nd Implementer's Draft of OpenID Connect for Identity Assurance 1.0 which was published on May 19, 2020.The Implementer's Draft 3 of OpenID Connect for Identity Assurance 1.0, which was published on September 6, 2021, made many breaking changes. - Parameters:
- used-- trueto indicate that the old format of- "verified_claims"is used.
- Since:
- 2.42
- See Also:
- OpenID Connect for Identity Assurance 1.0
 
 - 
getClaimsForIdTokenpublic String[] getClaimsForIdToken() Get the claims that the client application requests to be embedded in the ID token.- Returns:
- The claims that the client application requests to be embedded in the ID token.
- Since:
- 2.56
 
 - 
setClaimsForIdTokenpublic void setClaimsForIdToken(String[] claims) Set the claims that the client application requests to be embedded in the ID token.- Parameters:
- claims- The claims that the client application requests to be embedded in the ID token.
- Since:
- 2.56
 
 - 
getClaimsForUserInfopublic String[] getClaimsForUserInfo() Get the claims that the client application requests to be embedded in userinfo responses.- Returns:
- The claims that the client application requests to be embedded in userinfo responses.
- Since:
- 2.56
 
 - 
setClaimsForUserInfopublic void setClaimsForUserInfo(String[] claims) Set the claims that the client application requests to be embedded in userinfo responses.- Parameters:
- claims- The claims that the client application requests to be embedded in userinfo responses.
- Since:
- 2.56
 
 
- 
 
-