Class TokenRequest

java.lang.Object
com.vonage.client.auth.camara.TokenRequest
All Implemented Interfaces:
QueryParamsRequest

public final class TokenRequest extends Object implements QueryParamsRequest
Represents the request parameters for the intermediate (second) step in an OAuth2 three-legged workflow.
  • Constructor Details

    • TokenRequest

      public TokenRequest(String authReqId)
      Creates a new Back-End token request.
      Parameters:
      authReqId - The auth request ID, as obtained from BackendAuthResponse.getAuthReqId().
    • TokenRequest

      public TokenRequest(URI redirectUrl, String code)
      Creates a new Front-End token request.
      Parameters:
      redirectUrl - The Redirect URI set in the Vonage Application.
      code - The authentication code that is used to exchange for an access token.
  • Method Details

    • makeParams

      Description copied from interface: QueryParamsRequest
      Internal method for serializing the fields of this class into query parameters. The Map should be mutable so that subclasses can add fields, otherwise the method or implementing class should be marked as final. Duplicate entries can be handled by mapping the key to a list of the entries.
      Specified by:
      makeParams in interface QueryParamsRequest
      Returns:
      The query parameters as unique key-value pairs.