Package org.forgerock.openidconnect
Class IdTokenResponseTypeHandler
- java.lang.Object
-
- org.forgerock.openidconnect.IdTokenResponseTypeHandler
-
- All Implemented Interfaces:
ResponseTypeHandler
@Singleton public class IdTokenResponseTypeHandler extends Object implements ResponseTypeHandler
Implementation of the ResponseTypeHandler for handling OpenId Connect token response types.- Since:
- 12.0.0
-
-
Constructor Summary
Constructors Constructor Description IdTokenResponseTypeHandler(OpenIdConnectTokenStore tokenStore, OpenAMSettings openAMSettings)Constructs a new IdTokenResponseTypeHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2Constants.UrlLocationgetReturnLocation()Returns the location in which the token should be returned,OAuth2Constants.UrlLocation.Map.Entry<String,Token>handle(String tokenType, Set<String> scope, ResourceOwner resourceOwner, String clientId, String redirectUri, String nonce, OAuth2Request request, String codeChallenge, String codeChallengeMethod)Handles the creating of a Token instance and storing the Token in the OAuth2 providerTokenStore.
-
-
-
Constructor Detail
-
IdTokenResponseTypeHandler
@Inject public IdTokenResponseTypeHandler(OpenIdConnectTokenStore tokenStore, OpenAMSettings openAMSettings)
Constructs a new IdTokenResponseTypeHandler.- Parameters:
tokenStore- An instance of the OpenIdConnectTokenStore.openAMSettings- An instance of the OpenAMSettings.
-
-
Method Detail
-
handle
public Map.Entry<String,Token> handle(String tokenType, Set<String> scope, ResourceOwner resourceOwner, String clientId, String redirectUri, String nonce, OAuth2Request request, String codeChallenge, String codeChallengeMethod) throws ServerException, InvalidClientException, NotFoundException
Handles the creating of a Token instance and storing the Token in the OAuth2 providerTokenStore.- Specified by:
handlein interfaceResponseTypeHandler- Parameters:
tokenType- The type of the token.scope- The requested scope.resourceOwner- The resource owner.clientId- The client's id.redirectUri- The redirect uri.nonce- The nonce.request- The OAuth2 request.codeChallenge- The code challenge.codeChallengeMethod- The code challenge method.- Returns:
- A
Map.Entryof the token name with the Token instance. - Throws:
ServerException- If any internal server error occurs.InvalidClientException- If either the request does not contain the client's id or the client fails to be authenticated.NotFoundException- If the realm does not have an OAuth 2.0 provider service.
-
getReturnLocation
public OAuth2Constants.UrlLocation getReturnLocation()
Returns the location in which the token should be returned,OAuth2Constants.UrlLocation.- Specified by:
getReturnLocationin interfaceResponseTypeHandler- Returns:
- The UrlLocation.
-
-