public class AuthConfig extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AuthConfig.Builder |
| Modifier and Type | Field and Description |
|---|---|
private String |
email |
private static org.slf4j.Logger |
log |
private static com.fasterxml.jackson.databind.ObjectMapper |
MAPPER |
private String |
password |
private String |
serverAddress |
private String |
username |
| Modifier | Constructor and Description |
|---|---|
private |
AuthConfig() |
private |
AuthConfig(AuthConfig.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
static AuthConfig.Builder |
builder() |
private static Path |
defaultConfigPath() |
String |
email() |
boolean |
equals(Object o) |
private static com.fasterxml.jackson.databind.JsonNode |
extractAuthJson(Path configPath) |
static AuthConfig.Builder |
fromDockerConfig()
This function looks for and parses credentials for logging into Docker registries.
|
(package private) static AuthConfig.Builder |
fromDockerConfig(Path configPath)
Returns the first credential from the specified path to the docker file.
|
(package private) static AuthConfig.Builder |
fromDockerConfig(Path configPath,
String serverAddress)
Returns the specified credential from the specified path to the docker file.
|
static AuthConfig.Builder |
fromDockerConfig(String serverAddress)
This function looks for and parses credentials for logging into the Docker registry specified
by serverAddress.
|
int |
hashCode() |
private static AuthConfig.Builder |
parseDockerConfig(Path configPath,
String serverAddress) |
String |
password() |
String |
serverAddress() |
AuthConfig.Builder |
toBuilder() |
String |
toString() |
String |
username() |
private static final org.slf4j.Logger log
private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER
private String username
private String password
private String email
private String serverAddress
private AuthConfig()
private AuthConfig(AuthConfig.Builder builder)
public String username()
public String password()
public String email()
public String serverAddress()
public AuthConfig.Builder toBuilder()
public static AuthConfig.Builder fromDockerConfig() throws IOException
AuthConfig.BuilderIOException - when we can't parse the docker config filepublic static AuthConfig.Builder fromDockerConfig(String serverAddress) throws IOException
serverAddress - A string representing the server addressAuthConfig.BuilderIOException - when we can't parse the docker config filestatic AuthConfig.Builder fromDockerConfig(Path configPath) throws IOException
configPath - The path to the config fileAuthConfig.BuilderIOException - when we can't parse the docker config filestatic AuthConfig.Builder fromDockerConfig(Path configPath, String serverAddress) throws IOException
configPath - The path to the config fileserverAddress - A string representing the server addressAuthConfig.BuilderIOException - If an IOException occurredprivate static Path defaultConfigPath()
private static AuthConfig.Builder parseDockerConfig(Path configPath, String serverAddress) throws IOException
IOExceptionprivate static com.fasterxml.jackson.databind.JsonNode extractAuthJson(Path configPath) throws IOException
IOExceptionpublic static AuthConfig.Builder builder()
Copyright © 2016. All rights reserved.