public static class GoogleAuthTokenFactory.OAuth2Token extends Object implements HttpAuthToken
| Constructor and Description |
|---|
GoogleAuthTokenFactory.OAuth2Token(com.google.api.client.auth.oauth2.Credential credential)
Create a new
GoogleAuthTokenFactory.OAuth2Token object. |
| Modifier and Type | Method and Description |
|---|---|
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. |
public GoogleAuthTokenFactory.OAuth2Token(com.google.api.client.auth.oauth2.Credential credential)
GoogleAuthTokenFactory.OAuth2Token object. Store the Credential to
use when generating the header.credential - the required OAuth 2.0 credentialspublic String getAuthorizationHeader(URL requestUrl, String requestMethod)
getAuthorizationHeader in interface HttpAuthTokenrequestUrl - the URL being requestedrequestMethod - the HTTP method of the requestpublic boolean refreshToken()
throws AuthenticationException
Credential to request a new access token from the
authorization endpoint.AuthenticationExceptionCopyright © 2012. All Rights Reserved.