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(EventDispatcher eventDispatcher,
String serverUrl,
String repository)
Gets a new initializer for
RegistryAuthenticator. |
RegistryAuthenticator |
setCredential(Credential credential)
Sets a
Credential to help the authentication. |
public RegistryAuthenticator setCredential(@Nullable Credential credential)
Credential to help the authentication.credential - the credential used to authenticate.public static RegistryAuthenticator.Initializer initializer(EventDispatcher eventDispatcher, String serverUrl, String repository)
RegistryAuthenticator.eventDispatcher - the event dispatcher used for dispatching log eventsserverUrl - the server URL for the registry (for example, gcr.io)repository - the image/repository name (also known as, namespace)RegistryAuthenticator.Initializerpublic Authorization authenticatePull() throws RegistryAuthenticationFailedException
Authorization authenticating the pullRegistryAuthenticationFailedException - if authentication failspublic Authorization authenticatePush() throws RegistryAuthenticationFailedException
Authorization authenticating the pushRegistryAuthenticationFailedException - if authentication failsCopyright © 2019. All rights reserved.