Stores configuration options for how to authenticate with remote repositories.
| Modifiers | Name | Description |
|---|---|---|
static enum |
AuthConfig.Option |
Available authentication options. |
| Type | Name and description |
|---|---|
static java.lang.String |
FORCE_OPTIONSystem property name used to force a specific authentication option. |
static java.lang.String |
PASSWORD_ENV_VAR |
static java.lang.String |
PASSWORD_OPTION |
static java.lang.String |
SSH_PASSPHRASE_OPTION |
static java.lang.String |
SSH_PRIVATE_KEY_OPTION |
static java.lang.String |
SSH_SESSION_CONFIG_OPTION_PREFIX |
static java.lang.String |
USERNAME_ENV_VAR |
static java.lang.String |
USERNAME_OPTION |
| Type Params | Return Type | Name and description |
|---|---|---|
|
boolean |
allows(AuthConfig.Option option)Test whether the given authentication option is allowed by this configuration. |
|
static AuthConfig |
fromMap(java.util.Map props, java.util.Map env = [:])Factory method to construct an authentication configuration from the given properties and environment. |
|
static AuthConfig |
fromSystem()Factory method to construct an authentication configuration from the current system properties and environment variables. |
|
java.util.Set<Option> |
getAllowed()Set of all authentication options that are allowed in this configuration. |
|
Credentials |
getHardcodedCreds()Constructs and returns a Credentials instance reflecting the settings in the system properties. |
|
java.util.Map<java.lang.String, java.lang.String> |
getSessionConfig()Gets session config override for SSH session that is used underneath by JGit |
|
java.lang.String |
getSshPassphrase()Gets the passphrase for your SSH private key to use during authentication reflecting the value set in the system properties. |
|
java.lang.String |
getSshPrivateKeyPath()Gets the path to your SSH private key to use during authentication reflecting the value set in the system properties. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
System property name used to force a specific authentication option.
Test whether the given authentication option is allowed by this configuration.
option - the authentication option to test fortrue if the given option is allowed, false
otherwiseFactory method to construct an authentication configuration from the given properties and environment.
properties - the properties to use in this configurationenv - the environment vars to use in this configurationFactory method to construct an authentication configuration from the current system properties and environment variables.
Set of all authentication options that are allowed in this configuration.
Constructs and returns a Credentials instance reflecting the settings in the system properties.
nullGets session config override for SSH session that is used underneath by JGit
Gets the passphrase for your SSH private key to use during authentication reflecting the value set in the system properties.
nullGets the path to your SSH private key to use during authentication reflecting the value set in the system properties.
null