public class AppEngineCredentials extends GoogleCredentials implements ServiceAccountSigner
Fetches access tokens from the App Identity service.
Modifier and Type | Class and Description |
---|---|
static class |
AppEngineCredentials.Builder |
OAuth2Credentials.CredentialsChangedListener
ServiceAccountSigner.SigningException
quotaProjectId
Modifier and Type | Method and Description |
---|---|
GoogleCredentials |
createScoped(Collection<String> scopes)
If the credentials support scopes, creates a copy of the identity with the specified scopes;
otherwise, returns the same instance.
|
boolean |
createScopedRequired()
Indicates whether the credentials require scopes to be specified via a call to
GoogleCredentials.createScoped(java.util.Collection<java.lang.String>) before use. |
boolean |
equals(Object obj) |
String |
getAccount()
Returns the service account associated with the signer.
|
int |
hashCode() |
static AppEngineCredentials.Builder |
newBuilder() |
AccessToken |
refreshAccessToken()
Refresh the access token by getting it from the App Identity service
|
byte[] |
sign(byte[] toSign)
Signs the provided bytes using the private key associated with the service account.
|
AppEngineCredentials.Builder |
toBuilder() |
String |
toString() |
create, createDelegated, createScoped, createScoped, createWithCustomRetryStrategy, createWithQuotaProject, fromStream, fromStream, getAdditionalHeaders, getApplicationDefault, getApplicationDefault, getQuotaProjectId
addChangeListener, getAccessToken, getAuthenticationType, getFromServiceLoader, getRequestMetadata, getRequestMetadata, getRequestMetadataInternal, hasRequestMetadata, hasRequestMetadataOnly, newInstance, refresh, refreshIfExpired, removeChangeListener
blockingGetToCallback, getRequestMetadata
public AccessToken refreshAccessToken() throws IOException
refreshAccessToken
in class OAuth2Credentials
IOException
public boolean createScopedRequired()
GoogleCredentials
GoogleCredentials.createScoped(java.util.Collection<java.lang.String>)
before use.createScopedRequired
in class GoogleCredentials
public GoogleCredentials createScoped(Collection<String> scopes)
GoogleCredentials
createScoped
in class GoogleCredentials
scopes
- Collection of scopes to request.public String getAccount()
ServiceAccountSigner
getAccount
in interface ServiceAccountSigner
public byte[] sign(byte[] toSign)
ServiceAccountSigner
sign
in interface ServiceAccountSigner
toSign
- bytes to signpublic int hashCode()
hashCode
in class OAuth2Credentials
public String toString()
toString
in class OAuth2Credentials
public boolean equals(Object obj)
equals
in class OAuth2Credentials
public static AppEngineCredentials.Builder newBuilder()
public AppEngineCredentials.Builder toBuilder()
toBuilder
in class GoogleCredentials
Copyright © 2023 Google. All rights reserved.