Package org.apache.sshd.client
Interface ClientAuthenticationManager
-
- All Superinterfaces:
KeyIdentityProviderHolder
,UserAuthFactoriesManager<ClientSession,UserAuth,UserAuthFactory>
- All Known Subinterfaces:
ClientFactoryManager
,ClientSession
- All Known Implementing Classes:
AbstractClientSession
,ClientSessionImpl
,SshClient
public interface ClientAuthenticationManager extends UserAuthFactoriesManager<ClientSession,UserAuth,UserAuthFactory>, KeyIdentityProviderHolder
Holds information required for the client to perform authentication with the server
-
-
Method Summary
-
Methods inherited from interface org.apache.sshd.common.keyprovider.KeyIdentityProviderHolder
getKeyIdentityProvider, setKeyIdentityProvider
-
Methods inherited from interface org.apache.sshd.common.auth.UserAuthFactoriesManager
getUserAuthFactories, getUserAuthFactoriesNameList, getUserAuthFactoriesNames, setUserAuthFactories, setUserAuthFactoriesNameList, setUserAuthFactoriesNames
-
-
-
-
Method Detail
-
getRegisteredIdentities
AuthenticationIdentitiesProvider getRegisteredIdentities()
- Returns:
- The
AuthenticationIdentitiesProvider
to be used for attempting password or public key authentication
-
getPasswordIdentityProvider
PasswordIdentityProvider getPasswordIdentityProvider()
RetrievePasswordIdentityProvider
used to provide password candidates- Returns:
- The
PasswordIdentityProvider
instance - ignored ifnull
(i.e., no passwords available). - See Also:
addPasswordIdentity(String)
-
setPasswordIdentityProvider
void setPasswordIdentityProvider(PasswordIdentityProvider provider)
-
addPasswordIdentity
void addPasswordIdentity(java.lang.String password)
- Parameters:
password
- Password to be added - may not benull
/empty. Note: this password is in addition to whatever passwords are available via thePasswordIdentityProvider
(if any)
-
removePasswordIdentity
java.lang.String removePasswordIdentity(java.lang.String password)
- Parameters:
password
- The password to remove - ignored ifnull
/empty- Returns:
- The removed password - same one that was added via
addPasswordIdentity(String)
- ornull
if no match found
-
addPublicKeyIdentity
void addPublicKeyIdentity(java.security.KeyPair key)
- Parameters:
key
- TheKeyPair
to add - may not benull
Note: this key is in addition to whatever keys are available via theKeyIdentityProvider
(if any)
-
removePublicKeyIdentity
java.security.KeyPair removePublicKeyIdentity(java.security.KeyPair kp)
- Parameters:
kp
- TheKeyPair
to remove - ignored ifnull
- Returns:
- The removed
KeyPair
- same one that was added viaaddPublicKeyIdentity(KeyPair)
- ornull
if no match found
-
getServerKeyVerifier
ServerKeyVerifier getServerKeyVerifier()
Retrieve the server key verifier to be used to check the key when connecting to an SSH server.- Returns:
- the
ServerKeyVerifier
to use - nevernull
-
setServerKeyVerifier
void setServerKeyVerifier(ServerKeyVerifier serverKeyVerifier)
-
getUserInteraction
UserInteraction getUserInteraction()
- Returns:
- A
UserInteraction
object to communicate with the user (may benull
to indicate that no such communication is allowed)
-
setUserInteraction
void setUserInteraction(UserInteraction userInteraction)
-
getPasswordAuthenticationReporter
PasswordAuthenticationReporter getPasswordAuthenticationReporter()
-
setPasswordAuthenticationReporter
void setPasswordAuthenticationReporter(PasswordAuthenticationReporter reporter)
-
getPublicKeyAuthenticationReporter
PublicKeyAuthenticationReporter getPublicKeyAuthenticationReporter()
-
setPublicKeyAuthenticationReporter
void setPublicKeyAuthenticationReporter(PublicKeyAuthenticationReporter reporter)
-
getHostBasedAuthenticationReporter
HostBasedAuthenticationReporter getHostBasedAuthenticationReporter()
-
setHostBasedAuthenticationReporter
void setHostBasedAuthenticationReporter(HostBasedAuthenticationReporter reporter)
-
setUserAuthFactoriesNames
default void setUserAuthFactoriesNames(java.util.Collection<java.lang.String> names)
- Specified by:
setUserAuthFactoriesNames
in interfaceUserAuthFactoriesManager<ClientSession,UserAuth,UserAuthFactory>
-
-