public static class LocationConfigUtils.OsCredential
extends java.lang.Object
LocationConfigUtils.getOsCredential(ConfigBag)
.Modifier and Type | Method and Description |
---|---|
LocationConfigUtils.OsCredential |
checkNoErrors()
throws if there were errors resolving (e.g.
|
LocationConfigUtils.OsCredential |
checkNotEmpty()
throws if there are any problems
|
LocationConfigUtils.OsCredential |
doKeyValidation(boolean doKeyValidation)
whether to check the private/public keys and passphrase are coherent; default true
|
java.lang.String |
getPassword() |
java.lang.String |
getPreferredCredential()
returns either the key or password or null; if both a key and a password this prefers the key unless otherwise set
via
preferPassword() |
java.lang.String |
getPrivateKeyData() |
java.lang.String |
getPublicKeyData() |
java.util.Set<java.lang.String> |
getWarningMessages() |
boolean |
hasKey() |
boolean |
hasPassword() |
boolean |
isEmpty()
if there is no credential (ignores public key)
|
boolean |
isUsingPassword()
if a password is available, and either this is preferred over a key or there is no key
|
LocationConfigUtils.OsCredential |
logAnyWarnings() |
static LocationConfigUtils.OsCredential |
newInstance(ConfigBag config) |
LocationConfigUtils.OsCredential |
preferKey()
if both key and password supplied, prefer the key; the default
|
LocationConfigUtils.OsCredential |
preferPassword()
if both key and password supplied, prefer the password; see
preferKey() |
LocationConfigUtils.OsCredential |
requirePublicKey(boolean requirePublicKey)
if false, do not mind if there is no public key corresponding to any private key;
defaults to true; only applies if a private key is set
|
LocationConfigUtils.OsCredential |
throwOnErrors(boolean throwOnErrors)
whether to throw on problems
|
java.lang.String |
toString() |
LocationConfigUtils.OsCredential |
useDefaultKeys(boolean tryDefaultKeys)
if true (the default) this will look at default locations set on keys
|
LocationConfigUtils.OsCredential |
warnOnErrors(boolean warnOnErrors)
whether to log warnings on problems
|
public LocationConfigUtils.OsCredential checkNotEmpty()
public LocationConfigUtils.OsCredential checkNoErrors()
public LocationConfigUtils.OsCredential logAnyWarnings()
public java.util.Set<java.lang.String> getWarningMessages()
public java.lang.String getPreferredCredential()
preferPassword()
public boolean isEmpty()
public boolean hasKey()
public boolean hasPassword()
public boolean isUsingPassword()
public java.lang.String getPrivateKeyData()
public java.lang.String getPublicKeyData()
public java.lang.String getPassword()
public LocationConfigUtils.OsCredential preferKey()
public LocationConfigUtils.OsCredential preferPassword()
preferKey()
public LocationConfigUtils.OsCredential requirePublicKey(boolean requirePublicKey)
public LocationConfigUtils.OsCredential doKeyValidation(boolean doKeyValidation)
public LocationConfigUtils.OsCredential useDefaultKeys(boolean tryDefaultKeys)
public LocationConfigUtils.OsCredential warnOnErrors(boolean warnOnErrors)
public LocationConfigUtils.OsCredential throwOnErrors(boolean throwOnErrors)
public static LocationConfigUtils.OsCredential newInstance(ConfigBag config)
public java.lang.String toString()
toString
in class java.lang.Object