public class RegistryAuthenticator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RegistryAuthenticator.Initializer
Initializer for
RegistryAuthenticator. |
| Modifier and Type | Method and Description |
|---|---|
Authorization |
authenticatePull()
Authenticates permissions to pull.
|
Authorization |
authenticatePush()
Authenticates permission to pull and push.
|
static RegistryAuthenticator.Initializer |
initializer(String serverUrl,
String repository)
Gets a new initializer for
RegistryAuthenticator. |
RegistryAuthenticator |
setAuthorization(Authorization authorization)
Sets an
Authorization header to authenticate with. |
public static RegistryAuthenticator.Initializer initializer(String serverUrl, String repository)
RegistryAuthenticator.serverUrl - the server URL for the registry (for example, gcr.io)repository - the image/repository name (also known as, namespace)RegistryAuthenticator.Initializerpublic RegistryAuthenticator setAuthorization(@Nullable Authorization authorization)
Authorization header to authenticate with.authorization - the authorization headerpublic Authorization authenticatePull() throws RegistryAuthenticationFailedException
Authorization authenticating the pullRegistryAuthenticationFailedException - if authentication failspublic Authorization authenticatePush() throws RegistryAuthenticationFailedException
Authorization authenticating the pushRegistryAuthenticationFailedException - if authentication failsCopyright © 2018. All rights reserved.