| java.lang.Object |
| ↳ |
com.google.gdata.client.GoogleAuthTokenFactory.OAuth2Token |
Class Overview
Encapsulates the OAuth 2.0 information used by applications to login on
behalf of a user.
Summary
| Public Methods |
|
String
|
getAuthorizationHeader(URL requestUrl, String requestMethod)
Returns the authorization header using the user's OAuth 2.0 credentials.
|
|
boolean
|
refreshToken()
Use the Credential to request a new access token from the
authorization endpoint.
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
From interface
com.google.gdata.client.http.HttpAuthToken
|
abstract
String
|
getAuthorizationHeader(URL requestUrl, String requestMethod)
Returns an authorization header to be used for a HTTP request
for the respective authentication token.
|
|
Constants
static
final
String
HEADER_PREFIX
Constant Value:
"Bearer "
Fields
final
Credential
credential
Public Constructors
public
GoogleAuthTokenFactory.OAuth2Token
(Credential credential)
Parameters
| credential
| The required OAuth 2.0 credentials
|
Public Methods
public
String
getAuthorizationHeader
(URL requestUrl, String requestMethod)
Returns the authorization header using the user's OAuth 2.0 credentials.
Parameters
| requestUrl
| The URL being requested |
| requestMethod
| The HTTP method of the request |
Returns
- the authorization header to be used for the request
public
boolean
refreshToken
()
Use the Credential to request a new access token from the
authorization endpoint.
Returns
- whether a new access token was successfully retrieved