@Beta public static class AppIdentityCredential.AppEngineCredentialWrapper extends GoogleCredential
Beta
GoogleCredential.Builder
Credential.AccessMethod
Constructor and Description |
---|
AppEngineCredentialWrapper(HttpTransport transport,
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 TokenResponse |
executeRefreshToken() |
void |
intercept(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(HttpTransport transport, 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(HttpRequest request) throws IOException
intercept
in interface HttpExecuteInterceptor
intercept
in class Credential
IOException
public boolean createScopedRequired()
GoogleCredential
Beta
createScopedRequired
in class GoogleCredential
public GoogleCredential createScoped(Collection<String> scopes)
GoogleCredential
Beta
createScoped
in class GoogleCredential
protected TokenResponse executeRefreshToken() throws IOException
executeRefreshToken
in class GoogleCredential
IOException
Copyright © 2010–2022 Google. All rights reserved.