Interface ResponseTypeHandler


@SupportedAll public interface ResponseTypeHandler
Handles the issuing of Tokens for a response type, i.e. code, token, id_token.
Since:
12.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    org.forgerock.openam.oauth2.OAuth2Constants.UrlLocation
    Returns the location in which the token should be returned, OAuth2Constants.UrlLocation.
    handle(String tokenType, Set<String> scope, org.forgerock.oauth2.core.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 provider TokenStore.
  • Method Details

    • handle

      Map.Entry<String,Token> handle(String tokenType, Set<String> scope, org.forgerock.oauth2.core.ResourceOwner resourceOwner, String clientId, String redirectUri, String nonce, OAuth2Request request, String codeChallenge, String codeChallengeMethod) throws org.forgerock.oauth2.core.exceptions.ServerException, org.forgerock.oauth2.core.exceptions.InvalidClientException, org.forgerock.oauth2.core.exceptions.NotFoundException, org.forgerock.oauth2.core.exceptions.UnauthorizedClientException, InvalidRequestException
      Handles the creating of a Token instance and storing the Token in the OAuth2 provider TokenStore.
      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.Entry of the token name with the Token instance.
      Throws:
      org.forgerock.oauth2.core.exceptions.ServerException - If any internal server error occurs.
      org.forgerock.oauth2.core.exceptions.InvalidClientException - If either the request does not contain the client's id or the client fails to be authenticated.
      org.forgerock.oauth2.core.exceptions.NotFoundException - If the realm does not have an OAuth 2.0 provider service.
      org.forgerock.oauth2.core.exceptions.UnauthorizedClientException - If the client identity cannot be obtained.
      InvalidRequestException
    • getReturnLocation

      org.forgerock.openam.oauth2.OAuth2Constants.UrlLocation getReturnLocation()
      Returns the location in which the token should be returned, OAuth2Constants.UrlLocation.
      Returns:
      The UrlLocation.