public interface ClientAuthenticationManager extends KeyPairProviderHolder
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PASSWORD_PROMPTS
Default value for
PASSWORD_PROMPTS if none configured |
static java.lang.String |
PASSWORD_PROMPTS
Specifies the number of interactive prompts before giving up.
|
static java.lang.String |
PREFERRED_AUTHS
Ordered comma separated list of authentications methods.
|
Modifier and Type | Method and Description |
---|---|
void |
addPasswordIdentity(java.lang.String password) |
void |
addPublicKeyIdentity(java.security.KeyPair key) |
PasswordIdentityProvider |
getPasswordIdentityProvider()
Retrieve
PasswordIdentityProvider used to provide password
candidates |
AuthenticationIdentitiesProvider |
getRegisteredIdentities() |
ServerKeyVerifier |
getServerKeyVerifier()
Retrieve the server key verifier to be used to check the key when connecting
to an SSH server.
|
java.util.List<NamedFactory<UserAuth>> |
getUserAuthFactories() |
default java.lang.String |
getUserAuthFactoriesNameList() |
default java.util.List<java.lang.String> |
getUserAuthFactoriesNames() |
UserInteraction |
getUserInteraction() |
java.lang.String |
removePasswordIdentity(java.lang.String password) |
java.security.KeyPair |
removePublicKeyIdentity(java.security.KeyPair kp) |
void |
setPasswordIdentityProvider(PasswordIdentityProvider provider) |
void |
setServerKeyVerifier(ServerKeyVerifier serverKeyVerifier) |
void |
setUserAuthFactories(java.util.List<NamedFactory<UserAuth>> userAuthFactories) |
default void |
setUserAuthFactoriesNameList(java.lang.String names) |
default void |
setUserAuthFactoriesNames(java.util.Collection<java.lang.String> names) |
default void |
setUserAuthFactoriesNames(java.lang.String... names) |
void |
setUserInteraction(UserInteraction userInteraction) |
getKeyPairProvider, setKeyPairProvider
static final java.lang.String PREFERRED_AUTHS
null
/empty, then the session's getUserAuthFactories()
is used as-isstatic final java.lang.String PASSWORD_PROMPTS
DEFAULT_PASSWORD_PROMPTS
,
Constant Field Valuesstatic final int DEFAULT_PASSWORD_PROMPTS
PASSWORD_PROMPTS
if none configuredAuthenticationIdentitiesProvider getRegisteredIdentities()
AuthenticationIdentitiesProvider
to be used for attempting
password or public key authenticationPasswordIdentityProvider getPasswordIdentityProvider()
PasswordIdentityProvider
used to provide password
candidatesPasswordIdentityProvider
instance - ignored if null
(i.e., no passwords available)void setPasswordIdentityProvider(PasswordIdentityProvider provider)
void addPasswordIdentity(java.lang.String password)
password
- Password to be added - may not be null
/empty.
Note: this password is in addition to whatever passwords
are available via the PasswordIdentityProvider
(if any)java.lang.String removePasswordIdentity(java.lang.String password)
password
- The password to remove - ignored if null
/emptyaddPasswordIdentity(String)
- or null
if no
match foundvoid addPublicKeyIdentity(java.security.KeyPair key)
key
- The KeyPair
to add - may not be null
Note: this key is in addition to whatever keys
are available via the KeyIdentityProvider
(if any)java.security.KeyPair removePublicKeyIdentity(java.security.KeyPair kp)
kp
- The KeyPair
to remove - ignored if null
KeyPair
- same one that was added via
addPublicKeyIdentity(KeyPair)
- or null
if no
match foundServerKeyVerifier getServerKeyVerifier()
ServerKeyVerifier
to use - never null
void setServerKeyVerifier(ServerKeyVerifier serverKeyVerifier)
UserInteraction getUserInteraction()
UserInteraction
object to communicate with the user
(may be null
to indicate that no such communication is allowed)void setUserInteraction(UserInteraction userInteraction)
java.util.List<NamedFactory<UserAuth>> getUserAuthFactories()
List
of UserAuth
NamedFactory
-ies - never
null
/emptydefault java.lang.String getUserAuthFactoriesNameList()
default java.util.List<java.lang.String> getUserAuthFactoriesNames()
void setUserAuthFactories(java.util.List<NamedFactory<UserAuth>> userAuthFactories)
default void setUserAuthFactoriesNameList(java.lang.String names)
default void setUserAuthFactoriesNames(java.lang.String... names)
default void setUserAuthFactoriesNames(java.util.Collection<java.lang.String> names)