@Beta public static class AppIdentityCredential.AppEngineCredentialWrapper extends GoogleCredential
Beta
GoogleCredential.Builder
Constructor and Description |
---|
AppEngineCredentialWrapper(com.google.api.client.http.HttpTransport transport,
com.google.api.client.json.JsonFactory jsonFactory)
Constructs the wrapper using the default AppIdentityService.
|
Modifier and Type | Method and Description |
---|---|
GoogleCredential |
createScoped(Collection<String> scopes)
Beta For credentials that require scopes, creates a copy of the credential with the specified scopes. |
boolean |
createScopedRequired()
Beta Indicates whether the credential requires scopes to be specified by calling createScoped before use. |
protected com.google.api.client.auth.oauth2.TokenResponse |
executeRefreshToken() |
void |
intercept(com.google.api.client.http.HttpRequest request) |
createDelegated, fromStream, fromStream, getApplicationDefault, getApplicationDefault, getServiceAccountId, getServiceAccountPrivateKey, getServiceAccountPrivateKeyId, getServiceAccountProjectId, getServiceAccountScopes, getServiceAccountScopesAsString, getServiceAccountUser, setAccessToken, setExpirationTimeMilliseconds, setExpiresInSeconds, setFromTokenResponse, setRefreshToken, toBuilder
getAccessToken, getClientAuthentication, getClock, getExpirationTimeMilliseconds, getExpiresInSeconds, getJsonFactory, getMethod, getRefreshListeners, getRefreshToken, getRequestInitializer, getTokenServerEncodedUrl, getTransport, handleResponse, initialize, refreshToken
public AppEngineCredentialWrapper(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory) throws IOException
transport
- the transport for Http calls.jsonFactory
- the factory for Json parsing and formatting.IOException
- if the credential cannot be created for the current environment,
such as when the AppIndentityService is not available.public void intercept(com.google.api.client.http.HttpRequest request) throws IOException
intercept
in interface com.google.api.client.http.HttpExecuteInterceptor
intercept
in class com.google.api.client.auth.oauth2.Credential
IOException
public boolean createScopedRequired()
GoogleCredential
Beta
createScopedRequired
in class GoogleCredential
public GoogleCredential createScoped(Collection<String> scopes)
GoogleCredential
Beta
createScoped
in class GoogleCredential
protected com.google.api.client.auth.oauth2.TokenResponse executeRefreshToken() throws IOException
executeRefreshToken
in class GoogleCredential
IOException
Copyright © 2010–2019 Google. All rights reserved.