Class RefreshTokenGrantTypeHandler


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

      • 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 Detail

      • 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.