public abstract class OAuth2Credentials extends Credentials
| Constructor and Description |
|---|
OAuth2Credentials() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAuthenticationType() |
Map<String,List<String>> |
getRequestMetadata()
Provide the request metadata by ensuring there is a current access token and providing it
as an authorization bearer token.
|
boolean |
hasRequestMetadata() |
boolean |
hasRequestMetadataOnly() |
void |
refresh()
Refresh the token by discarding the cached token and metadata.
|
abstract AccessToken |
refreshAccessToken()
Abstract method to refresh the access token according to the specific type of credentials.
|
public String getAuthenticationType()
getAuthenticationType in class Credentialspublic boolean hasRequestMetadata()
hasRequestMetadata in class Credentialspublic boolean hasRequestMetadataOnly()
hasRequestMetadataOnly in class Credentialspublic Map<String,List<String>> getRequestMetadata() throws IOException
getRequestMetadata in class CredentialsIOExceptionpublic void refresh()
throws IOException
refresh in class CredentialsIOExceptionpublic abstract AccessToken refreshAccessToken() throws IOException
IOExceptionCopyright © 2015 Google. All rights reserved.