@Beta public class ComputeCredential extends Credential
Beta
Sample usage:
public static HttpRequestFactory createRequestFactory( HttpTransport transport, JsonFactory jsonFactory) { return transport.createRequestFactory(new GoogleComputeCredential(transport, jsonFactory)); }
Implementation is immutable and thread-safe.
Modifier and Type | Class and Description |
---|---|
static class |
ComputeCredential.Builder
Beta Google Compute Engine credential builder. |
Credential.AccessMethod
Modifier and Type | Field and Description |
---|---|
static String |
TOKEN_SERVER_ENCODED_URL
Metadata Service Account token server encoded URL.
|
Modifier | Constructor and Description |
---|---|
protected |
ComputeCredential(ComputeCredential.Builder builder) |
|
ComputeCredential(HttpTransport transport,
JsonFactory jsonFactory) |
Modifier and Type | Method and Description |
---|---|
protected TokenResponse |
executeRefreshToken() |
getAccessToken, getClientAuthentication, getClock, getExpirationTimeMilliseconds, getExpiresInSeconds, getJsonFactory, getMethod, getRefreshListeners, getRefreshToken, getRequestInitializer, getTokenServerEncodedUrl, getTransport, handleResponse, initialize, intercept, refreshToken, setAccessToken, setExpirationTimeMilliseconds, setExpiresInSeconds, setFromTokenResponse, setRefreshToken
public static final String TOKEN_SERVER_ENCODED_URL
public ComputeCredential(HttpTransport transport, JsonFactory jsonFactory)
transport
- HTTP transportjsonFactory
- JSON factoryprotected ComputeCredential(ComputeCredential.Builder builder)
builder
- builderprotected TokenResponse executeRefreshToken() throws IOException
executeRefreshToken
in class Credential
IOException
Copyright © 2010–2019 Google. All rights reserved.