Class RefreshTokenGrantTypeHandler

java.lang.Object
org.forgerock.secrets.oauth2.GrantTypeHandler
org.forgerock.secrets.oauth2.RefreshTokenGrantTypeHandler

public class RefreshTokenGrantTypeHandler extends GrantTypeHandler
A grant type handler that can obtain an access token using a previously obtained refresh token.
  • Constructor Details

    • RefreshTokenGrantTypeHandler

      public RefreshTokenGrantTypeHandler(String clientId, String refreshToken)
      Initialises the grant type handler for the given client id and refresh token.
      Parameters:
      clientId - the client id.
      refreshToken - the refresh token.
  • Method Details

    • handle

      protected Promise<Form,NoSuchSecretException> handle(Request tokenEndpointRequest, Form form)
      Description copied from class: GrantTypeHandler
      Handles the request by adding appropriate parameters to the OAuth 2.0 token endpoint request.
      Overrides:
      handle in class GrantTypeHandler
      Parameters:
      tokenEndpointRequest - the original token endpoint request.
      form - the POST body to add parameters to.
      Returns:
      a promise for the token endpoint request with parameters appropriate for this grant type.