Class BackchannelAuthenticationResponse
- java.lang.Object
-
- com.authlete.common.dto.ApiResponse
-
- com.authlete.common.dto.BackchannelAuthenticationResponse
-
- All Implemented Interfaces:
Serializable
public class BackchannelAuthenticationResponse extends ApiResponse
Response from Authlete's/api/backchannel/authenticationAPI.Authlete's
/api/backchannel/authenticationAPI returns JSON which can be mapped to this class. The authorization server implementation should retrieve the value ofactionfrom the response and take the following steps according to the value.BAD_REQUEST-
When the value of
actionisBAD_REQUEST, it means that the backchannel authentication request from the client application was wrong.The authorization server implementation should generate a response to the client application with
400 Bad Requestandapplication/json.The
getResponseContent()method returns a JSON string which describes the error, so it can be used as the entity body of the response.The following illustrates the response which the authorization server implementation should generate and return to the client application.
HTTP/1.1 400 Bad Request Content-Type: application/json Cache-Control: no-store Pragma: no-cache (The value returned from
getResponseContent())
UNAUTHORIZED-
When the value of
actionisUNAUTHORIZED, it means that client authentication of the backchannel authentication request failed. Note that client authentication is always required at the backchannel authentication endpoint. This implies that public clients are not allowed to use the backchannel authentication endpoint.The authorization server implementation should generate a response to the client application with
401 Unauthorizedandapplication/json.The
getResponseContent()method returns a JSON string which describes the error, so it can be used as the entity body of the response.The following illustrates the response which the authorization server implementation should generate and return to the client application.
HTTP/1.1 401 Unauthorized WWW-Authenticate: (challenge) Content-Type: application/json Cache-Control: no-store Pragma: no-cache (The value returned from
getResponseContent())
INTERNAL_SERVER_ERROR-
When the value of
actionisINTERNAL_SERVER_ERROR, it means that the API call from the authorization server implementation was wrong or that an error occurred in Authlete.In either case, from a viewpoint of the client application, it is an error on the server side. Therefore, the authorization server implementation should generate a response to the client application with
500 Internal Server Errorandapplication/json.The
getResponseContent()method returns a JSON string which describes the error, so it can be used as the entity body of the response.The following illustrates the response which the authorization server implementation should generate and return to the client application.
HTTP/1.1 500 Internal Server Error Content-Type: application/json Cache-Control: no-store Pragma: no-cache (The value returned from
getResponseContent())
USER_IDENTIFICATION-
When the value of
actionisUSER_IDENTIFICATION, it means that the backchannel authentication request from the client application is valid. The authorization server implementation has to follow the steps below.-
[END-USER IDENTIFICATION]
The first step is to determine the subject (= unique identifier) of the end-user from whom the client application wants to get authorization.
According to the CIBA specification, a backchannel authentication request contains one (and only one) of the
login_hint_token,id_token_hintandlogin_hintrequest parameters as a hint by which the authorization server identifies the subject of an end-user.
The authorization server implementation can know which hint is included in the backchannel authentication request by calling the
getHintType()method. The method returns aUserIdentificationHintTypeinstance that indicates which hint is included. For example, when the method returnsLOGIN_HINT, it means that the backchannel authentication request contains thelogin_hintrequest parameter as a hint.
The
getHint()method returns the value of the hint. For example, when thegetHintType()method returnsLOGIN_HINT, thegetHint()method returns the value of thelogin_hintrequest parameter.
It is up to the authorization server implementation how to determine the subject of the end-user from the hint. There are few things Authlete can help. Only one thing Authlete can do is to let the
getSub()method return the value of thesubclaim in theid_token_hintrequest parameter when the request parameter is used.
-
[END-USER IDENTIFICATION ERROR]
There are some cases where the authorization server implementation encounters an error during the user identification process. In any error case, the authorization server implementation has to return an HTTP response with the
errorresponse parameter to the client application. The following is an example of such error responses.
HTTP/1.1 400 Bad Request Content-Type: application/json Cache-Control: no-store Pragma: no-cache {"error":"unknown_user_id"}
Authlete provides
/api/backchannel/authentication/failAPI that builds the response body (JSON) of an error response. However, because it is easy to build an error response manually, you may choose not to call the API. One good thing in using the API is that the API call can trigger deletion of the ticket which has been issued from Authlete's/api/backchannel/authenticationAPI. If you don't call/api/backchannel/authentication/failAPI, the ticket will continue to exist in the database until it is cleaned up by the batch program after the ticket expires.
Possible error cases that the authorization server implementation itself has to handle are as follows. Other error cases have already been covered by
/api/backchannel/authenticationAPI.
errordescription expired_login_hint_tokenThe authorization server implementation detected that the hint presented by the
login_hint_tokenrequest parameter has expired.
Note that the format of
login_hint_tokenis not described in the CIBA Core spec at all and so there is no consensus on how to detect expiration oflogin_hint_token. Interpretation oflogin_hint_tokenis left to each authorization server implementation.unknown_user_idThe authorization server implementation could not determine the subject of the end-user by the presented hint.
unauthorized_clientThe authorization server implementation has custom rules to reject backchannel authentication requests from some particular clients and found that the client which has made the backchannel authentication request is one of the particular clients.
Note that
/api/backchannel/authenticationAPI does not returnaction=USER_IDENTIFICATIONin cases where the client does not exist or client authentication has failed. Therefore, the authorization server implementation will never have to use the error codeunauthorized_clientunless the server has intentionally implemented custom rules to reject backchannel authentication requests based on clients.missing_user_codeThe authorization server implementation has custom rules to require that a backchannel authentication request include a user code for some particular users and found that the user identified by the hint is one of the particular users.
Note that
/api/backchannel/authenticationAPI does not returnaction=USER_IDENTIFICATIONwhen both thebackchannel_user_code_parameter_supportedmetadata of the server and thebackchannel_user_code_parametermetadata of the client aretrueand the backchannel authentication request does not include theuser_coderequest parameter. In this case,/api/backchannel/authenticationAPI returnsaction=BAD_REQUESTwith JSON containing"error":"missing_user_code". Therefore, the authorization server implementation will never have to use the error codemissing_user_codeunless the server has intentionally implemented custom rules to require a user code based on users even in the case where thebackchannel_user_code_parametermetadata of the client which has made the backchannel authentication request isfalse.invalid_user_codeThe authorization server implementation detected that the presented user code is invalid.
Note that the format of
user_codeis not described in the CIBA Core spec at all and so there is no consensus on how to judge whether a user code is valid or not. It is up to each authorization server implementation how to handle user codes.invalid_binding_messageThe authorization server implementation detected that the presented binding message is invalid.
Note that the format of
binding_messageis not described in the CIBA Core spec at all and so there is no consensus on how to judge whether a binding message is valid or not. It is up to each authorization server implementation how to handle binding messages.invalid_targetThe authorization server implementation rejects the requested target resources.
The error code
"invalid_target"is from "Resource Indicators for OAuth 2.0". The specification defines the"resource"request parameter. By using the parameter, client applications can request target resources that should be bound to the access token being issued. If the authorization server wants to reject the request, call/api/backchannel/authentication/failAPI withINVALID_TARGET.
Note that "Resource Indicators for OAuth 2.0" is supported since Authlete 2.2. Older versions don't recognize the
resourcerequest parameter, sogetResources()always returns null if the Authlete server you are using is older than 2.2.access_deninedThe authorization server implementation has custom rules to reject backchannel authentication requests without asking the end-user and respond to the client as if the end-user had rejected the request in some particular cases and found that the backchannel authentication request is one of the particular cases.
The authorization server implementation will never have to use the error code
access_deniedat this timing unless the server has intentionally implemented custom rules to reject backchannel authentication requests without asking the end-user and respond to the client as if the end-user had rejected the request.
-
[AUTH_REQ_ID ISSUE]
If the authorization server implementation has successfully determined the subject of the end-user, the next action is to return an HTTP response to the client application which contains
auth_req_id.
Authlete provides
/api/backchannel/authentication/issueAPI which generates a JSON containingauth_req_id, so, your next action is (1) call the API, (2) receive the response from the API, (3) build a response to the client application using the content of the API response, and (4) return the response to the client application. See the description of/api/backchannel/authentication/issueAPI for details.
-
[END-USER AUTHENTICATION AND AUTHORIZATION]
After sending a JSON containing
auth_req_idback to the client application, the authorization server implementation starts to communicate with an authentication device of the end-user. It is assumed that end-user authentication is performed on the authentication device and the end-user confirms the content of the backchannel authentication request and grants authorization to the client application if everything is okay. The authorization server implementation must be able to receive the result of the end-user authentication and authorization from the authentication device.
How to communicate with an authentication device and achieve end-user authentication and authorization is up to each authorization server implementation, but the following request parameters of the backchannel authentication request should be taken into consideration in any implementation.
parameter method description acr_valuesgetAcrs()A backchannel authentication request may contain an array of ACRs (Authentication Context Class References) in preference order. If multiple authentication devices are registered for the end-user, the authorization server implementation should take the ACRs into consideration when selecting the best authentication device.
scopegetScopes(),getDynamicScopes()A backchannel authentication request always contains a list of scopes. At least,
openidis included in the list (otherwise/api/backchannel/authenticationAPI returnsaction=BAD_REQUEST). It would be better to show the requested scopes to the end-user on the authentication device or somewhere appropriate.
If the
scoperequest parameter containsaddress,email,phoneand/orprofile, they are interpreted as defined in 5.4. Requesting Claims using Scope Values of OpenID Connect Core 1.0. That is, they are expanded into a list of claim names. ThegetClaimNames()method returns the expanded result.The
scoperequest parameter may contain dynamic scopes. They are obtained throughgetDynamicScopes()method. See the description of theDynamicScopeclass for details about dynamic scopes.binding_messagegetBindingMessage()A backchannel authentication request may contain a binding message. It is a human readable identifier or message intended to be displayed on both the consumption device (client application) and the authentication device.
user_codegetUserCode()A backchannel authentication request may contain a user code. It is a secret code, such as password or pin, known only to the end-user but verifiable by the authorization server. The user code should be used to authorize sending a request to the authentication device.
-
[END-USER AUTHENTICATION AND AUTHORIZATION COMPLETION]
After receiving the result of end-user authentication and authorization, the authorization server implementation must call Authlete's
/api/backchannel/authentication/completeto tell Authlete the result and pass necessary data so that Authlete can generate an ID token, an access token and optionally a refresh token. See the description of the API for details.
-
[CLIENT NOTIFICATION]
When the backchannel token delivery mode is either
pingorpush, the authorization server implementation must send a notification to the pre-registered notification endpoint of the client after the end-user authentication and authorization. In this case,getAction()method ofBackchannelAuthenticationCompleteResponse(a response from/api/backchannel/authentication/completeAPI) returnsNOTIFICATION. See the description of/api/backchannel/authentication/completeAPI for details.
-
[TOKEN REQUEST]
When the backchannel token delivery mode is either
pingorpoll, the client application will make a token request to the token endpoint to get an ID token, an access token and optionally a refresh token.
A token request that corresponds to a backchannel authentication request uses
urn:openid:params:grant-type:cibaas the value of thegrant_typerequest parameter. Authlete's/api/auth/tokenAPI recognizes the grant type automatically and behaves properly, so the existing token endpoint implementation does not have to be changed to support CIBA.
-
- Since:
- 2.32
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBackchannelAuthenticationResponse.ActionThe next action that the OpenID provider implementation should take.
-
Constructor Summary
Constructors Constructor Description BackchannelAuthenticationResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getAcrs()Get the list of ACR values requested by the backchannel authentication request.BackchannelAuthenticationResponse.ActiongetAction()Get the next action that the implementation of the backchannel authentication endpoint should take.AuthzDetailsgetAuthorizationDetails()Get the authorization details.StringgetBindingMessage()Get the binding message included in the backchannel authentication request.String[]getClaimNames()Get the names of the claims which were requested indirectly via some special scopes.Pair[]getClientAttributes()Get the attributes of the client.ClientAuthMethodgetClientAuthMethod()Get the client authentication method that should be performed at the backchannel authentication endpoint.URIgetClientEntityId()Get the entity ID of the client.longgetClientId()Get the client ID of the client application that has made the backchannel authentication request.StringgetClientIdAlias()Get the client ID alias of the client application that has made the backchannel authentication request.StringgetClientIdentifier()Get the client identifier used in the backchannel authentication request.StringgetClientName()Get the name of the client application which has made the backchannel authentication request.StringgetClientNotificationToken()Get the client notification token included in the backchannel authentication request.DeliveryModegetDeliveryMode()Get the backchannel token delivery mode of the client application.DynamicScope[]getDynamicScopes()Get the dynamic scopes which the client application requested by thescoperequest parameter.GMActiongetGmAction()Get the value of thegrant_management_actionrequest parameter.GrantgetGrant()Get the content of the grant which is identified by thegrant_idrequest parameter.StringgetGrantId()Get the value of thegrant_idrequest parameter.StringgetGrantSubject()Get the subject of the user who has given the grant which is identified by thegrant_idrequest parameter.StringgetHint()Get the value of the hint for end-user identification.UserIdentificationHintTypegetHintType()Get the type of the hint for end-user identification which was included in the backchannel authentication request.StringgetRequestContext()Get the request context of the backchannel authentication request.intgetRequestedExpiry()Get the requested expiry for the authentication request ID (auth_req_id).URI[]getResources()Get the resources specified by theresourcerequest parameters or by theresourceproperty in the request object.StringgetResponseContent()Get the content that can be used to generate a response to the client application.Scope[]getScopes()Get the scopes requested by the backchannel authentication request.Pair[]getServiceAttributes()Get the attributes of the service that the client application belongs to.StringgetSub()Get the value of the"sub"claim contained in the ID token hint included in the backchannel authentication request.StringgetTicket()Get the ticket that is necessary for the implementation of the backchannel authentication endpoint to call/api/backchannel/authentication/*API.StringgetUserCode()Get the user code included in the backchannel authentication request.String[]getWarnings()Get the warnings raised during processing the backchannel authentication request.booleanisClientEntityIdUsed()Get the flag which indicates whether the entity ID of the client was used in the backchannel authentication request as a client ID.booleanisClientIdAliasUsed()Get the flag which indicates whether the client ID alias was used in the backchannel authentication request.booleanisUserCodeRequired()Get the flag which indicates whether a user code is required.BackchannelAuthenticationResponsesetAcrs(String[] acrs)Set the list of ACR values requested by the backchannel authentication request.BackchannelAuthenticationResponsesetAction(BackchannelAuthenticationResponse.Action action)Set the next action that the implementation of the backchannel authentication endpoint should take.BackchannelAuthenticationResponsesetAuthorizationDetails(AuthzDetails details)Set the authorization details.BackchannelAuthenticationResponsesetBindingMessage(String message)Set the binding message included in the backchannel authentication request.BackchannelAuthenticationResponsesetClaimNames(String[] names)Set the names of the claims which were requested indirectly via some special scopes.BackchannelAuthenticationResponsesetClientAttributes(Pair[] attributes)Set the attributes of the client.BackchannelAuthenticationResponsesetClientAuthMethod(ClientAuthMethod method)Set the client authentication method that should be performed at the backchannel authentication endpoint.BackchannelAuthenticationResponsesetClientEntityId(URI entityId)Set the entity ID of the client.BackchannelAuthenticationResponsesetClientEntityIdUsed(boolean used)Set the flag which indicates whether the entity ID of the client was used in the backchannel authentication request as a client ID.BackchannelAuthenticationResponsesetClientId(long clientId)Set the client ID of the client application that has made the backchannel authentication request.BackchannelAuthenticationResponsesetClientIdAlias(String alias)Set the client ID alias of the client application that has made the backchannel authentication request.BackchannelAuthenticationResponsesetClientIdAliasUsed(boolean used)Set the flag which indicates whether the client ID alias was used in the backchannel authentication request.BackchannelAuthenticationResponsesetClientName(String name)Set the name of the client application which has made the backchannel authentication request.BackchannelAuthenticationResponsesetClientNotificationToken(String token)Set the client notification token included in the backchannel authentication request.BackchannelAuthenticationResponsesetDeliveryMode(DeliveryMode mode)Set the backchannel token delivery mode of the client application.BackchannelAuthenticationResponsesetDynamicScopes(DynamicScope[] dynamicScopes)Set the dynamic scopes which the client application requested by thescoperequest parameter.BackchannelAuthenticationResponsesetGmAction(GMAction action)Set the value of thegrant_management_actionrequest parameter.BackchannelAuthenticationResponsesetGrant(Grant grant)Set the content of the grant which is identified by thegrant_idrequest parameter.BackchannelAuthenticationResponsesetGrantId(String grantId)Set the value of thegrant_idrequest parameter.BackchannelAuthenticationResponsesetGrantSubject(String subject)Set the subject of the user who has given the grant which is identified by thegrant_idrequest parameter.BackchannelAuthenticationResponsesetHint(String hint)Set the value of the hint for end-user identification.BackchannelAuthenticationResponsesetHintType(UserIdentificationHintType hintType)Set the type of the hint for end-user identification which was included in the backchannel authentication request.BackchannelAuthenticationResponsesetRequestContext(String context)Set the request context of the backchannel authentication request.BackchannelAuthenticationResponsesetRequestedExpiry(int seconds)Set the requested expiry for the authentication request ID (auth_req_id).BackchannelAuthenticationResponsesetResources(URI[] resources)Set the resources specified by theresourcerequest parameters or by theresourceproperty in the request object.BackchannelAuthenticationResponsesetResponseContent(String responseContent)Set the content that can be used to generate a response to the client application.BackchannelAuthenticationResponsesetScopes(Scope[] scopes)Set the scopes requested by the backchannel authentication request.BackchannelAuthenticationResponsesetServiceAttributes(Pair[] attributes)Set the attributes of the service that the client application belongs to.BackchannelAuthenticationResponsesetSub(String sub)Set the value of the"sub"claim contained in the ID token hint included in the backchannel authentication request.BackchannelAuthenticationResponsesetTicket(String ticket)Set the ticket that is necessary for the implementation of the backchannel authentication endpoint to call/api/backchannel/authentication/*API.BackchannelAuthenticationResponsesetUserCode(String userCode)Set the user code included in the backchannel authentication request.BackchannelAuthenticationResponsesetUserCodeRequired(boolean required)Set the flag which indicates whether a user code is required.BackchannelAuthenticationResponsesetWarnings(String[] warnings)Set the warnings raised during processing the backchannel authentication request.-
Methods inherited from class com.authlete.common.dto.ApiResponse
getResponseHeaders, getResultCode, getResultMessage, setResponseHeaders, setResultCode, setResultMessage
-
-
-
-
Method Detail
-
getAction
public BackchannelAuthenticationResponse.Action getAction()
Get the next action that the implementation of the backchannel authentication endpoint should take.- Returns:
- The next action.
-
setAction
public BackchannelAuthenticationResponse setAction(BackchannelAuthenticationResponse.Action action)
Set the next action that the implementation of the backchannel authentication endpoint should take.- Parameters:
action- The next action.- Returns:
thisobject.
-
getResponseContent
public String getResponseContent()
Get the content that can be used to generate a response to the client application.When this method returns a non-null value, it is JSON containing error information. When
getAction()returnsUSER_IDENTIFICATION, this method returnsnull.- Returns:
- The content of a response to the client.
-
setResponseContent
public BackchannelAuthenticationResponse setResponseContent(String responseContent)
Set the content that can be used to generate a response to the client application.- Parameters:
responseContent- The content of a response to the client.- Returns:
thisobject.
-
getClientId
public long getClientId()
Get the client ID of the client application that has made the backchannel authentication request.- Returns:
- The client ID of the client application.
-
setClientId
public BackchannelAuthenticationResponse setClientId(long clientId)
Set the client ID of the client application that has made the backchannel authentication request.- Parameters:
clientId- The client ID of the client application.- Returns:
thisobject.
-
getClientIdAlias
public String getClientIdAlias()
Get the client ID alias of the client application that has made the backchannel authentication request.- Returns:
- The client ID alias of the client application.
-
setClientIdAlias
public BackchannelAuthenticationResponse setClientIdAlias(String alias)
Set the client ID alias of the client application that has made the backchannel authentication request.- Parameters:
alias- The client ID alias of the client application.- Returns:
thisobject.
-
isClientIdAliasUsed
public boolean isClientIdAliasUsed()
Get the flag which indicates whether the client ID alias was used in the backchannel authentication request.- Returns:
trueif the client ID alias was used in the request.
-
setClientIdAliasUsed
public BackchannelAuthenticationResponse setClientIdAliasUsed(boolean used)
Set the flag which indicates whether the client ID alias was used in the backchannel authentication request.- Parameters:
used-trueto indicate that the client ID alias was used in the request.- Returns:
thisobject.
-
getClientEntityId
public URI getClientEntityId()
Get the entity ID of the client."Entity ID" is a technical term defined in OpenID Federation 1.0.
- Returns:
- The entity ID of the client.
- Since:
- 3.37, Authlete 2.3
- See Also:
- OpenID Federation 1.0
-
setClientEntityId
public BackchannelAuthenticationResponse setClientEntityId(URI entityId)
Set the entity ID of the client."Entity ID" is a technical term defined in OpenID Federation 1.0.
- Parameters:
entityId- The entity ID of the client.- Returns:
thisobject.- Since:
- 3.37, Authlete 2.3
- See Also:
- OpenID Federation 1.0
-
isClientEntityIdUsed
public boolean isClientEntityIdUsed()
Get the flag which indicates whether the entity ID of the client was used in the backchannel authentication request as a client ID."Entity ID" is a technical term defined in OpenID Federation 1.0.
- Returns:
trueif the entity ID of the client was used in the request as a client ID.- Since:
- 3.37, Authlete 2.3
- See Also:
- OpenID Federation 1.0
-
setClientEntityIdUsed
public BackchannelAuthenticationResponse setClientEntityIdUsed(boolean used)
Set the flag which indicates whether the entity ID of the client was used in the backchannel authentication request as a client ID."Entity ID" is a technical term defined in OpenID Federation 1.0.
- Parameters:
used-trueto indicate that the entity ID of the client was used in the request as a client ID.- Returns:
thisobject.- Since:
- 3.37, Authlete 2.3
- See Also:
- OpenID Federation 1.0
-
getClientIdentifier
public String getClientIdentifier()
Get the client identifier used in the backchannel authentication request.When
isClientIdAliasUsed()returnstrue, this method returns the same value asgetClientIdAlias()does. Otherwise, ifisClientEntityIdUsed()returnstrue, this method returns the same value asgetClientEntityId().toString()does. In other cases, this method returns the string representation of the value returned fromgetClientId().- Returns:
- The client identifier used in the backchannel authentication request.
-
getClientName
public String getClientName()
Get the name of the client application which has made the backchannel authentication request.- Returns:
- The name of the client application.
-
setClientName
public BackchannelAuthenticationResponse setClientName(String name)
Set the name of the client application which has made the backchannel authentication request.- Parameters:
name- The name of the client application.- Returns:
thisobject.
-
getClientAuthMethod
public ClientAuthMethod getClientAuthMethod()
Get the client authentication method that should be performed at the backchannel authentication endpoint.If the client could not be identified by the information in the request, this method returns
null.- Returns:
- The client authentication method that should be performed at the backchannel authentication endpoint.
- Since:
- 2.50
-
setClientAuthMethod
public BackchannelAuthenticationResponse setClientAuthMethod(ClientAuthMethod method)
Set the client authentication method that should be performed at the backchannel authentication endpoint.- Parameters:
method- The client authentication method that should be performed at the backchannel authentication endpoint.- Returns:
thisobject.- Since:
- 2.50
-
getDeliveryMode
public DeliveryMode getDeliveryMode()
Get the backchannel token delivery mode of the client application.- Returns:
- The backchannel token delivery mode.
-
setDeliveryMode
public BackchannelAuthenticationResponse setDeliveryMode(DeliveryMode mode)
Set the backchannel token delivery mode of the client application.- Parameters:
mode- The backchannel token delivery mode.- Returns:
thisobject.
-
getScopes
public Scope[] getScopes()
Get the scopes requested by the backchannel authentication request.Basically, this method returns the value of the
"scope"request parameter in the backchannel authentication request. However, because unregistered scopes are dropped on Authlete side, if the"scope"request parameter contains unknown scopes, the list returned by this method becomes different from the value of the"scope"request parameter.Note that
Scope.getDescription()method andScope.getDescriptions()method of each element (Scopeinstance) in the array returned from this method always returnnulleven if descriptions of the scopes are registered.- Returns:
- The requested scopes.
-
setScopes
public BackchannelAuthenticationResponse setScopes(Scope[] scopes)
Set the scopes requested by the backchannel authentication request.- Parameters:
scopes- The requested scopes.- Returns:
thisobject.
-
getDynamicScopes
public DynamicScope[] getDynamicScopes()
Get the dynamic scopes which the client application requested by thescoperequest parameter. See the description ofDynamicScopefor details.- Returns:
- The list of dynamic scopes.
- Since:
- 2.92
- See Also:
DynamicScope
-
setDynamicScopes
public BackchannelAuthenticationResponse setDynamicScopes(DynamicScope[] dynamicScopes)
Set the dynamic scopes which the client application requested by thescoperequest parameter. See the description ofDynamicScopefor details.- Parameters:
dynamicScopes- The list of dynamic scopes.- Returns:
thisobject.- Since:
- 2.92
- See Also:
DynamicScope
-
getClaimNames
public String[] getClaimNames()
Get the names of the claims which were requested indirectly via some special scopes. See 5.4. Requesting Claims using Scope Values in OpenID Connect Core 1.0 for details.- Returns:
- The names of the requested claims.
-
setClaimNames
public BackchannelAuthenticationResponse setClaimNames(String[] names)
Set the names of the claims which were requested indirectly via some special scopes.- Parameters:
names- The names of the requested claims.- Returns:
thisobject.
-
getClientNotificationToken
public String getClientNotificationToken()
Get the client notification token included in the backchannel authentication request. It is the value of theclient_notification_tokenrequest parameter.When the backchannel token delivery mode is
"ping"or"push", the backchannel authentication request must include a client notification token.- Returns:
- The client notification token included in the backchannel authentication request.
-
setClientNotificationToken
public BackchannelAuthenticationResponse setClientNotificationToken(String token)
Set the client notification token included in the backchannel authentication request. It is the value of theclient_notification_tokenrequest parameter.When the backchannel token delivery mode is
"ping"or"push", the backchannel authentication request must include a client notification token.- Parameters:
token- The client notification token included in the backchannel authentication request.- Returns:
thisobject.
-
getAcrs
public String[] getAcrs()
Get the list of ACR values requested by the backchannel authentication request.Basically, this method returns the value of the
"acr_values"request parameter in the backchannel authentication request. However, because unsupported ACR values are dropped on Authlete side, if the"acr_values"request parameter contains unrecognized ACR values, the list returned by this method becomes different from the value of the"acr_values"request parameter.- Returns:
- The list of requested ACR values.
-
setAcrs
public BackchannelAuthenticationResponse setAcrs(String[] acrs)
Set the list of ACR values requested by the backchannel authentication request.- Parameters:
acrs- The list of requested ACR values.- Returns:
thisobject.
-
getHintType
public UserIdentificationHintType getHintType()
Get the type of the hint for end-user identification which was included in the backchannel authentication request.When the backchannel authentication request contains
"id_token_hint", this method returnsID_TOKEN_HINT. Likewise, this method returnsLOGIN_HINTwhen the request contains"login_hint", or returnsLOGIN_HINT_TOKENwhen the request contains"login_hint_token".Note that a backchannel authentication request must include one and only one hint among
"id_token_hint","login_hint"and"login_hint_token".- Returns:
- The type of the hint for end-user identification.
-
setHintType
public BackchannelAuthenticationResponse setHintType(UserIdentificationHintType hintType)
Set the type of the hint for end-user identification which was included in the backchannel authentication request.- Parameters:
hintType- The type of the hint for end-user identification.- Returns:
thisobject.
-
getHint
public String getHint()
Get the value of the hint for end-user identification.When
getHintType()returnsID_TOKEN_HINT, this method returns the value of the"id_token_hint"request parameter. Likewise, this method returns the value of the"login_hint"request parameter whengetHintType()returnsLOGIN_HINT, or returns the value of the"login_hint_token"request parameter whengetHintType()returnsLOGIN_HINT_TOKEN.- Returns:
- The value of the hint for end-user identification.
-
setHint
public BackchannelAuthenticationResponse setHint(String hint)
Set the value of the hint for end-user identification.- Parameters:
hint- The value of the hint for end-user identification.- Returns:
thisobject.
-
getSub
public String getSub()
Get the value of the"sub"claim contained in the ID token hint included in the backchannel authentication request.This method works only when the backchannel authentication request contains the
"id_token_hint"request parameter.- Returns:
- The value of the
"sub"claim contained in the ID token hint.
-
setSub
public BackchannelAuthenticationResponse setSub(String sub)
Set the value of the"sub"claim contained in the ID token hint included in the backchannel authentication request.- Parameters:
sub- The value of the"sub"claim contained in the ID token hint.- Returns:
thisobject.
-
getUserCode
public String getUserCode()
Get the user code included in the backchannel authentication request. It is the value of the"user_code"request parameter.- Returns:
- The user code.
-
setUserCode
public BackchannelAuthenticationResponse setUserCode(String userCode)
Set the user code included in the backchannel authentication request. It is the value of the"user_code"request parameter.- Parameters:
userCode- The user code.- Returns:
thisobject.
-
getRequestedExpiry
public int getRequestedExpiry()
Get the requested expiry for the authentication request ID (auth_req_id). It is the value of the"requested_expiry"request parameter.- Returns:
- The requested expiry in seconds.
- Since:
- 2.35
-
setRequestedExpiry
public BackchannelAuthenticationResponse setRequestedExpiry(int seconds)
Set the requested expiry for the authentication request ID (auth_req_id). It is the value of the"requested_expiry"request parameter.- Parameters:
seconds- The requested expiry in seconds.- Returns:
thisobject.- Since:
- 2.35
-
isUserCodeRequired
public boolean isUserCodeRequired()
Get the flag which indicates whether a user code is required.This method returns
truewhen both thebackchannel_user_code_parametermetadata of the client (=Client'sbcUserCodeRequiredproperty) and thebackchannel_user_code_parameter_supportedmetadata of the service (=Service'sbackchannelUserCodeParameterSupportedproperty) aretrue.- Returns:
truewhen a user code is required.- Since:
- 2.33
-
setUserCodeRequired
public BackchannelAuthenticationResponse setUserCodeRequired(boolean required)
Set the flag which indicates whether a user code is required.- Parameters:
required-trueto indicate that a user code is required.- Returns:
thisobject.- Since:
- 2.33
-
getBindingMessage
public String getBindingMessage()
Get the binding message included in the backchannel authentication request. It is the value of the"binding_message"request parameter.- Returns:
- The binding message.
-
setBindingMessage
public BackchannelAuthenticationResponse setBindingMessage(String message)
Set the binding message included in the backchannel authentication request. It is the value of the"binding_message"request parameter.- Parameters:
message- The binding message.- Returns:
thisobject.
-
getRequestContext
public String getRequestContext()
Get the request context of the backchannel authentication request. It is the value of the"request_context"claim in the signed authentication request and its format is JSON."request_context"is a new claim added by the FAPI-CIBA profile.This method returns
nullif the backchannel authentication request does not include a"request"request parameter or the JWT specified by the request parameter does not include a"request_context"claim.- Returns:
- The request context in JSON format.
- Since:
- 2.45
-
setRequestContext
public BackchannelAuthenticationResponse setRequestContext(String context)
Set the request context of the backchannel authentication request. It is the value of the"request_context"claim in the signed authentication request and its format is JSON."request_context"is a new claim added by the FAPI-CIBA profile.- Parameters:
context- The request context in JSON format.- Returns:
thisobject.- Since:
- 2.45
-
getResources
public URI[] getResources()
Get the resources specified by theresourcerequest parameters or by theresourceproperty in the request object. If both are given, the values in the request object take precedence. See "Resource Indicators for OAuth 2.0" for details.- Returns:
- Target resources.
- Since:
- 2.62
-
setResources
public BackchannelAuthenticationResponse setResources(URI[] resources)
Set the resources specified by theresourcerequest parameters or by theresourceproperty in the request object. If both are given, the values in the request object should be set. See "Resource Indicators for OAuth 2.0" for details.- Parameters:
resources- Target resources.- Returns:
thisobject.- Since:
- 2.62
-
getAuthorizationDetails
public AuthzDetails getAuthorizationDetails()
Get the authorization details. This represents the value of the"authorization_details"request parameter which is defined in "OAuth 2.0 Rich Authorization Requests".- Returns:
- Authorization details.
- Since:
- 2.56
-
setAuthorizationDetails
public BackchannelAuthenticationResponse setAuthorizationDetails(AuthzDetails details)
Set the authorization details. This represents the value of the"authorization_details"request parameter which is defined in "OAuth 2.0 Rich Authorization Requests".- Parameters:
details- Authorization details.- Returns:
thisobject.- Since:
- 2.56
-
getGmAction
public GMAction getGmAction()
Get the value of thegrant_management_actionrequest parameter.The
grant_management_actionrequest parameter is defined in Grant Management for OAuth 2.0, which is supported by Authlete 2.3 and newer versions.- Returns:
- A grant management action.
nullor one ofCREATE,REPLACEandMERGE. - Since:
- 3.1
- See Also:
- Grant Management for OAuth 2.0
-
setGmAction
public BackchannelAuthenticationResponse setGmAction(GMAction action)
Set the value of thegrant_management_actionrequest parameter.The
grant_management_actionrequest parameter is defined in Grant Management for OAuth 2.0, which is supported by Authlete 2.3 and newer versions.- Parameters:
action- A grant management action.nullor one ofCREATE,REPLACEandMERGE.- Returns:
thisobject.- Since:
- 3.1
- See Also:
- Grant Management for OAuth 2.0
-
getGrantId
public String getGrantId()
Get the value of thegrant_idrequest parameter.The
grant_idrequest parameter is defined in Grant Management for OAuth 2.0, which is supported by Authlete 2.3 and newer versions.- Returns:
- A grant ID.
- Since:
- 3.1
- See Also:
- Grant Management for OAuth 2.0
-
setGrantId
public BackchannelAuthenticationResponse setGrantId(String grantId)
Set the value of thegrant_idrequest parameter.The
grant_idrequest parameter is defined in Grant Management for OAuth 2.0, which is supported by Authlete 2.3 and newer versions.- Parameters:
grantId- A grant ID.- Returns:
thisobject.- Since:
- 3.1
- See Also:
- Grant Management for OAuth 2.0
-
getGrantSubject
public String getGrantSubject()
Get the subject of the user who has given the grant which is identified by thegrant_idrequest parameter.Authlete 2.3 and newer versions support Grant Management for OAuth 2.0. A backchannel authentication request may contain a
grant_idrequest parameter which is defined in the specification. If the value of the request parameter is valid,getGrantSubject()will return the subject of the user who has given the grant to the client application. Authorization server implementations may use the value returned fromgetGrantSubject()in order to determine the user to authenticate.The user your system will authenticate during the authorization process (or has already authenticated) may be different from the user of the grant. The first implementer's draft of "Grant Management for OAuth 2.0" does not mention anything about the case, so the behavior in the case is left to implementations. Authlete will not perform the grant management action when the
subjectpassed to Authlete does not match the user of the grant.- Returns:
- The subject of the user who has given the grant.
- Since:
- 3.1
- See Also:
- Grant Management for OAuth 2.0
-
setGrantSubject
public BackchannelAuthenticationResponse setGrantSubject(String subject)
Set the subject of the user who has given the grant which is identified by thegrant_idrequest parameter.Authlete 2.3 and newer versions support Grant Management for OAuth 2.0. A backchannel authentication request may contain a
grant_idrequest parameter which is defined in the specification. If the value of the request parameter is valid,getGrantSubject()will return the subject of the user who has given the grant to the client application. Authorization server implementations may use the value returned fromgetGrantSubject()in order to determine the user to authenticate.The user your system will authenticate during the authorization process (or has already authenticated) may be different from the user of the grant. The first implementer's draft of "Grant Management for OAuth 2.0" does not mention anything about the case, so the behavior in the case is left to implementations. Authlete will not perform the grant management action when the
subjectpassed to Authlete does not match the user of the grant.- Parameters:
subject- The subject of the user who has given the grant.- Returns:
thisobject.- Since:
- 3.1
- See Also:
- Grant Management for OAuth 2.0
-
getGrant
public Grant getGrant()
Get the content of the grant which is identified by thegrant_idrequest parameter.The user your system will authenticate during the authorization process (or has already authenticated) may be different from the user of the grant. Be careful when your system displays the content of the grant.
- Returns:
- The content of the grant.
- Since:
- 3.1
- See Also:
- Grant Management for OAuth 2.0
-
setGrant
public BackchannelAuthenticationResponse setGrant(Grant grant)
Set the content of the grant which is identified by thegrant_idrequest parameter.The user your system will authenticate during the authorization process (or has already authenticated) may be different from the user of the grant. Be careful when your system displays the content of the grant.
- Parameters:
grant- The content of the grant.- Returns:
thisobject.- Since:
- 3.1
- See Also:
- Grant Management for OAuth 2.0
-
getServiceAttributes
public Pair[] getServiceAttributes()
Get the attributes of the service that the client application belongs to.This property is available since Authlete 2.2.
- Returns:
- The attributes of the service.
- Since:
- 2.88
-
setServiceAttributes
public BackchannelAuthenticationResponse setServiceAttributes(Pair[] attributes)
Set the attributes of the service that the client application belongs to.This property is available since Authlete 2.2.
- Parameters:
attributes- The attributes of the service.- Returns:
thisobject.- Since:
- 2.88
-
getClientAttributes
public Pair[] getClientAttributes()
Get the attributes of the client.This property is available since Authlete 2.2.
- Returns:
- The attributes of the client.
- Since:
- 2.88
-
setClientAttributes
public BackchannelAuthenticationResponse setClientAttributes(Pair[] attributes)
Set the attributes of the client.This property is available since Authlete 2.2.
- Parameters:
attributes- The attributes of the client.- Returns:
thisobject.- Since:
- 2.88
-
getWarnings
public String[] getWarnings()
Get the warnings raised during processing the backchannel authentication request.- Returns:
- Warnings. This may be
null.
-
setWarnings
public BackchannelAuthenticationResponse setWarnings(String[] warnings)
Set the warnings raised during processing the backchannel authentication request.- Parameters:
warnings- Warnings.- Returns:
thisobject.
-
getTicket
public String getTicket()
Get the ticket that is necessary for the implementation of the backchannel authentication endpoint to call/api/backchannel/authentication/*API.- Returns:
- The ticket issued from
/api/backchannel/authenticationAPI.
-
setTicket
public BackchannelAuthenticationResponse setTicket(String ticket)
Set the ticket that is necessary for the implementation of the backchannel authentication endpoint to call/api/backchannel/authentication/*API.- Parameters:
ticket- The ticket issued from/api/backchannel/authenticationAPI.- Returns:
thisobject.
-
-