Package com.google.api.client.auth.oauth
Class AbstractOAuthGetToken
- java.lang.Object
-
- java.util.AbstractMap<java.lang.String,java.lang.Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.http.GenericUrl
-
- com.google.api.client.auth.oauth.AbstractOAuthGetToken
-
- All Implemented Interfaces:
java.lang.Cloneable,java.util.Map<java.lang.String,java.lang.Object>
- Direct Known Subclasses:
OAuthGetAccessToken,OAuthGetTemporaryToken
@Beta public abstract class AbstractOAuthGetToken extends com.google.api.client.http.GenericUrlBeta
Generic OAuth 1.0a URL to request a temporary or long-lived token from an authorization server.- Since:
- 1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringconsumerKeyRequired identifier portion of the client credentials (equivalent to a username).OAuthSignersignerRequired OAuth signature algorithm.com.google.api.client.http.HttpTransporttransportHTTP transport required for executing request inexecute().protected booleanusePosttruefor POST request or the defaultfalsefor GET request.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractOAuthGetToken(java.lang.String authorizationServerUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuthParameterscreateParameters()Returns a new instance of the OAuth authentication provider.OAuthCredentialsResponseexecute()Executes the HTTP request for a temporary or long-lived token.-
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
-
transport
public com.google.api.client.http.HttpTransport transport
HTTP transport required for executing request inexecute().- Since:
- 1.3
-
consumerKey
public java.lang.String consumerKey
Required identifier portion of the client credentials (equivalent to a username).
-
signer
public OAuthSigner signer
Required OAuth signature algorithm.
-
usePost
protected boolean usePost
truefor POST request or the defaultfalsefor GET request.
-
-
Method Detail
-
execute
public final OAuthCredentialsResponse execute() throws java.io.IOException
Executes the HTTP request for a temporary or long-lived token.- Returns:
- OAuth credentials response object
- Throws:
java.io.IOException
-
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.
-
-