Class OAuthGetAccessToken (1.34.1)

public class OAuthGetAccessToken extends AbstractOAuthGetToken

Beta
Generic OAuth 1.0a URL to request to exchange the temporary credentials token (or "request token") for a long-lived credentials token (or "access token") from an authorization server.

Use #execute() to execute the request. The long-lived access token acquired with this request is found in OAuthCredentialsResponse#token . This token must be stored. It may then be used to authorize HTTP requests to protected resources by using OAuthParameters.

Inheritance

java.lang.Object > java.util.AbstractMap > com.google.api.client.util.GenericData > com.google.api.client.http.GenericUrl > AbstractOAuthGetToken > OAuthGetAccessToken

Constructors

OAuthGetAccessToken(String authorizationServerUrl)

public OAuthGetAccessToken(String authorizationServerUrl)
Parameter
NameDescription
authorizationServerUrlString

encoded authorization server URL

Fields

temporaryToken

public String temporaryToken

Required temporary token. It is retrieved from the OAuthCredentialsResponse#token returned from OAuthGetTemporaryToken#execute().

Field Value
TypeDescription
String

verifier

public String verifier

Required verifier code received from the server when the temporary token was authorized. It is retrieved from OAuthCallbackUrl#verifier.

Field Value
TypeDescription
String

Methods

createParameters()

public OAuthParameters createParameters()

Returns a new instance of the OAuth authentication provider. Subclasses may override by calling this super implementation and then adding OAuth parameters.

Returns
TypeDescription
OAuthParameters
Overrides