com.google.api.client.auth.oauth
Class OAuthGetAccessToken

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.google.api.client.util.GenericData
          extended by com.google.api.client.http.GenericUrl
              extended by com.google.api.client.auth.oauth.AbstractOAuthGetToken
                  extended by com.google.api.client.auth.oauth.OAuthGetAccessToken
All Implemented Interfaces:
Cloneable, Map<String,Object>

public class OAuthGetAccessToken
extends AbstractOAuthGetToken

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

Since:
1.0
Author:
Yaniv Inbar

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 String temporaryToken
          Required temporary token.
 String verifier
          Required verifier code received from the server when the temporary token was authorized.
 
Fields inherited from class com.google.api.client.auth.oauth.AbstractOAuthGetToken
consumerKey, signer, transport, usePost
 
Fields inherited from class com.google.api.client.http.GenericUrl
fragment, host, pathParts, port, scheme
 
Fields inherited from class com.google.api.client.util.GenericData
unknownFields
 
Constructor Summary
OAuthGetAccessToken(String authorizationServerUrl)
           
 
Method Summary
 OAuthParameters createParameters()
          Returns a new instance of the OAuth authentication provider.
 
Methods inherited from class com.google.api.client.auth.oauth.AbstractOAuthGetToken
execute
 
Methods inherited from class com.google.api.client.http.GenericUrl
appendRawPath, build, clone, equals, getAll, getFirst, getRawPath, hashCode, setRawPath, toPathParts, toString
 
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, put, putAll, remove, set
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

temporaryToken

public String temporaryToken
Required temporary token. It is retrieved from the OAuthCredentialsResponse.token returned from AbstractOAuthGetToken.execute().


verifier

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

Constructor Detail

OAuthGetAccessToken

public OAuthGetAccessToken(String authorizationServerUrl)
Parameters:
authorizationServerUrl - encoded authorization server URL
Method Detail

createParameters

public OAuthParameters createParameters()
Description copied from class: AbstractOAuthGetToken
Returns a new instance of the OAuth authentication provider. Subclasses may override by calling this super implementation and then adding OAuth parameters.

Overrides:
createParameters in class AbstractOAuthGetToken


Copyright © 2010-2011 Google. All Rights Reserved.