Package com.google.auth (1.29.1-SNAPSHOT)

Classes

ApiKeyCredentials

Credentials class for calling Google APIs using an API key.

Uses an API key directly in the request metadata to provide authorization.

Note: ApiKeyCredentials extends from base Credentials class rather than GoogleCredentials/OAuth2Credentials, as it does not provide an access token and is not considered an OAuth2 credential.


 Credentials credentials = ApiKeyCredentials.create("your api key");
 

Credentials

Represents an abstract authorized identity instance.

Interfaces

RequestMetadataCallback

The callback that receives the result of the asynchronous Credentials#getRequestMetadata(java.net.URI, java.util.concurrent.Executor, RequestMetadataCallback). Exactly one method should be called.

Retryable

ServiceAccountSigner

Interface for a service account signer. A signer for a service account is capable of signing bytes using the private key associated with its service account.

Enums

CredentialTypeForMetrics

Defines the different types of credentials that can be used for metrics.

Each credential type is associated with a label that is used for reporting purposes. Add new enum constant only when corresponding configs established.

Credentials with type CredentialTypeForMetrics.DO_NOT_SEND is default value for credential implementations that do not set type specifically. It is not expected to send metrics.

See Also: #getLabel()

Exceptions

ServiceAccountSigner.SigningException