Package com.google.api.client.auth.oauth
Class OAuthGetAccessToken
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.http.GenericUrl
-
- com.google.api.client.auth.oauth.AbstractOAuthGetToken
-
- com.google.api.client.auth.oauth.OAuthGetAccessToken
-
@Beta 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
AbstractOAuthGetToken.execute()
to execute the request. The long-lived access token acquired with this request is found inOAuthCredentialsResponse.token
. This token must be stored. It may then be used to authorize HTTP requests to protected resources by usingOAuthParameters
.- Since:
- 1.0
- Author:
- Yaniv Inbar
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description 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
-
-
Constructor Summary
Constructors Constructor Description OAuthGetAccessToken(String authorizationServerUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, buildAuthority, buildRelativeUrl, clone, equals, getAll, getFirst, getFragment, getHost, getPathParts, getPort, getRawPath, getScheme, getUserInfo, hashCode, set, setFragment, setHost, setPathParts, setPort, setRawPath, setScheme, setUserInfo, toPathParts, toString, toURI, toURL, toURL
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
-
-
-
Field Detail
-
temporaryToken
public String temporaryToken
Required temporary token. It is retrieved from theOAuthCredentialsResponse.token
returned fromAbstractOAuthGetToken.execute()
.
-
verifier
public String verifier
Required verifier code received from the server when the temporary token was authorized. It is retrieved fromOAuthCallbackUrl.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 classAbstractOAuthGetToken
-
-