Package org.mandas.docker.client.auth
Class MultiRegistryAuthSupplier
java.lang.Object
org.mandas.docker.client.auth.MultiRegistryAuthSupplier
- All Implemented Interfaces:
RegistryAuthSupplier
A RegistryAuthSupplier that combines authentication info from multiple RegistryAuthSupplier
instances.
The order of the suppliers matters: RegistryAuthSuppliers earlier in the list are
checked first to see if they can handle authentication for the given operation before trying
later RegistryAuthSuppliers in the list (a RegistryAuthSupplier signals that it can't handle the
operation by returning null).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a RegistryAuth object that works with a given registry's API [e.g.Authentication info to pass in the X-Registry-Config header when building an image.Returns a RegistryAuth object that is valid for a Docker Swarm context [i.e.
-
Constructor Details
-
MultiRegistryAuthSupplier
-
-
Method Details
-
authFor
Description copied from interface:RegistryAuthSupplierReturns a RegistryAuth object that works with a given registry's API [e.g. GCR].- Specified by:
authForin interfaceRegistryAuthSupplier- Returns:
- the RegistryAuth to use when working with the image, or else
nullif no authentication info applies for this image - Throws:
DockerException
-
authForSwarm
Description copied from interface:RegistryAuthSupplierReturns a RegistryAuth object that is valid for a Docker Swarm context [i.e. not tied to specific image]. It's unnecessary if it's not planned to use this AuthSupplier to pull images for Swarm.- Specified by:
authForSwarmin interfaceRegistryAuthSupplier- Returns:
- the RegistryAuth to use in Swarn, or else
nullfor no authentication info - Throws:
DockerException
-
authForBuild
Description copied from interface:RegistryAuthSupplierAuthentication info to pass in the X-Registry-Config header when building an image.- Specified by:
authForBuildin interfaceRegistryAuthSupplier- Returns:
- the registry configs
- Throws:
DockerException
-