Class ContainerRegistryAuthSupplier

java.lang.Object
org.mandas.docker.client.auth.gcr.ContainerRegistryAuthSupplier
All Implemented Interfaces:
RegistryAuthSupplier

public class ContainerRegistryAuthSupplier extends Object implements RegistryAuthSupplier
A RegistryAuthSupplier for getting access tokens from a Google Cloud Platform service or user account. This implementation uses the google-auth-library-oauth2-http library to get an access token given an account's credentials, and will refresh the token if it expires within a configurable amount of time.

To construct a new instance, use fromStream(InputStream) to get a ContainerRegistryAuthSupplier.Builder if you have credentials for the account to use, or you can use forApplicationDefaultCredentials() if you would like to use the Application Default Credentials.

The scopes used to fetch an access token and the minimum expiry time can be configured via the Builder before calling ContainerRegistryAuthSupplier.Builder.build().