Package com.google.auth (1.27.0)

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.


Credentialscredentials=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.

Exceptions

ServiceAccountSigner.SigningException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.