public class ComputeEngineCredentials extends GoogleCredentials
Fetches access tokens from the Google Compute Engine metadata server.
OAuth2Credentials.CredentialsChangedListener| Constructor and Description |
|---|
ComputeEngineCredentials()
Constructor with minimum information and default behavior.
|
ComputeEngineCredentials(HttpTransportFactory transportFactory)
Constructor with overridden transport.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static String |
getMetadataServerUrl() |
static String |
getMetadataServerUrl(com.google.auth.oauth2.DefaultCredentialsProvider provider) |
static String |
getTokenServerEncodedUrl() |
static String |
getTokenServerEncodedUrl(com.google.auth.oauth2.DefaultCredentialsProvider provider) |
int |
hashCode() |
AccessToken |
refreshAccessToken()
Refresh the access token by getting it from the GCE metadata server
|
String |
toString() |
createDelegated, createScoped, createScopedRequired, fromStream, fromStream, getApplicationDefault, getApplicationDefaultaddChangeListener, getAccessToken, getAuthenticationType, getFromServiceLoader, getRequestMetadata, getRequestMetadata, hasRequestMetadata, hasRequestMetadataOnly, newInstance, refresh, toStringHelperblockingGetToCallback, getRequestMetadatapublic ComputeEngineCredentials()
public ComputeEngineCredentials(HttpTransportFactory transportFactory)
transportFactory - HTTP transport factory, creates the transport used to get access
tokens.public AccessToken refreshAccessToken() throws IOException
refreshAccessToken in class OAuth2CredentialsIOException - from derived implementationspublic static String getMetadataServerUrl(com.google.auth.oauth2.DefaultCredentialsProvider provider)
public static String getMetadataServerUrl()
public static String getTokenServerEncodedUrl(com.google.auth.oauth2.DefaultCredentialsProvider provider)
public static String getTokenServerEncodedUrl()
public int hashCode()
hashCode in class OAuth2Credentialspublic String toString()
toString in class OAuth2Credentialspublic boolean equals(Object obj)
equals in class OAuth2CredentialsCopyright © 2017 Google. All rights reserved.