Package com.authlete.jaxrs.spi
Class BackchannelAuthenticationRequestHandlerSpiAdapter
- java.lang.Object
-
- com.authlete.jaxrs.spi.BackchannelAuthenticationRequestHandlerSpiAdapter
-
- All Implemented Interfaces:
BackchannelAuthenticationRequestHandlerSpi
public class BackchannelAuthenticationRequestHandlerSpiAdapter extends Object implements BackchannelAuthenticationRequestHandlerSpi
Empty implementation ofBackchannelAuthenticationRequestHandlerSpiinterface.- Since:
- 2.13
- Author:
- Hideki Ikeda
-
-
Constructor Summary
Constructors Constructor Description BackchannelAuthenticationRequestHandlerSpiAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.authlete.common.types.UsergetUserByHint(com.authlete.common.types.UserIdentificationHintType hintType, String hint, String sub)Get a user by the hint.booleanisLoginHintTokenExpired(String loginHintToken)Check whether a login hint token expired or not.booleanisValidBindingMessage(String bindingMessage)Check if a binding message is valid or not.booleanisValidUserCode(com.authlete.common.types.User user, String userCode)Check whether a user code is valid or not.booleanshouldCheckUserCode(com.authlete.common.types.User user, com.authlete.common.dto.BackchannelAuthenticationResponse info)Check whether a user code should be checked or not.voidstartCommunicationWithAuthenticationDevice(com.authlete.common.types.User user, com.authlete.common.dto.BackchannelAuthenticationResponse baRes, com.authlete.common.dto.BackchannelAuthenticationIssueResponse baiRes)Start a background process where the authorization server starts communicating with an authentication device for end-user authentication and authorization.
-
-
-
Method Detail
-
getUserByHint
public com.authlete.common.types.User getUserByHint(com.authlete.common.types.UserIdentificationHintType hintType, String hint, String sub)Description copied from interface:BackchannelAuthenticationRequestHandlerSpiGet a user by the hint.- Specified by:
getUserByHintin interfaceBackchannelAuthenticationRequestHandlerSpi- Parameters:
hintType- The type of the hint contained in the backchannel authentication request.hint- The hint contained in the backchannel authentication request. This value is equivalent to the value of the"login_hint"request parameter, the"id_token_hint"request parameter or the"login_hint_token"request parameter contained in the backchannel authentication request.sub- The value of the"sub"claim of the ID token hint contained in the backchannel authentication request as the"id_token_hint"request parameter. This value isnullif the backchannel authentication request does not contain the"id_token_hint"request parameter.- Returns:
- A user identified by the hint.
nullis returned if a user is not found using the hint.
-
isLoginHintTokenExpired
public boolean isLoginHintTokenExpired(String loginHintToken)
Description copied from interface:BackchannelAuthenticationRequestHandlerSpiCheck whether a login hint token expired or not.This method is called only when the
"login_hint_token"request parameter is contained in the backchannel authentication request.- Specified by:
isLoginHintTokenExpiredin interfaceBackchannelAuthenticationRequestHandlerSpi- Parameters:
loginHintToken- The value of the"login_hint_token"request parameter contained in the backchannel authentication request..- Returns:
trueif the login hint token has already expired. Otherwise,false.
-
shouldCheckUserCode
public boolean shouldCheckUserCode(com.authlete.common.types.User user, com.authlete.common.dto.BackchannelAuthenticationResponse info)Description copied from interface:BackchannelAuthenticationRequestHandlerSpiCheck whether a user code should be checked or not.- Specified by:
shouldCheckUserCodein interfaceBackchannelAuthenticationRequestHandlerSpi- Parameters:
user- A user from whom the client asks for authorization.info- The information about the backchannel authentication request.- Returns:
trueif a user code should be checked. Otherwise,false.
-
isValidUserCode
public boolean isValidUserCode(com.authlete.common.types.User user, String userCode)Description copied from interface:BackchannelAuthenticationRequestHandlerSpiCheck whether a user code is valid or not.This method is called only when
BackchannelAuthenticationRequestHandlerSpi.shouldCheckUserCode(User, BackchannelAuthenticationResponse)returnstrue.- Specified by:
isValidUserCodein interfaceBackchannelAuthenticationRequestHandlerSpi- Parameters:
user- A user from whom the client asks for authorization.userCode- A user code contained in the backchannel authentication request.- Returns:
trueif a user code is valid. Otherwise,false.
-
startCommunicationWithAuthenticationDevice
public void startCommunicationWithAuthenticationDevice(com.authlete.common.types.User user, com.authlete.common.dto.BackchannelAuthenticationResponse baRes, com.authlete.common.dto.BackchannelAuthenticationIssueResponse baiRes)Description copied from interface:BackchannelAuthenticationRequestHandlerSpiStart a background process where the authorization server starts communicating with an authentication device for end-user authentication and authorization.Typically this method will invoke a new thread in which the communication between the authorization server and the authentication device will occur.
- Specified by:
startCommunicationWithAuthenticationDevicein interfaceBackchannelAuthenticationRequestHandlerSpi- Parameters:
user- A user who is to be authenticated and asked to authorize the client application.baRes- The response from Authlete's/api/backchannel/authenticationAPI.baiRes- The response from Authlete's/api/backchannel/authentication/issueAPI.
-
isValidBindingMessage
public boolean isValidBindingMessage(String bindingMessage)
Description copied from interface:BackchannelAuthenticationRequestHandlerSpiCheck if a binding message is valid or not.This method is called only when the
binding_messagerequest parameter is contained in the backchannel authentication request.- Specified by:
isValidBindingMessagein interfaceBackchannelAuthenticationRequestHandlerSpi- Parameters:
bindingMessage- The value of thebinding_messagerequest parameter contained in the backchannel authentication request.- Returns:
trueif the binding message is valid. Otherwise,false.
-
-