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
- Author:
- Apache MINA SSHD Project
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPasswordIdentity
(String password) void
RetrievePasswordIdentityProvider
used to provide password candidatesRetrieve the server key verifier to be used to check the key when connecting to an SSH server.removePasswordIdentity
(String password) void
void
void
void
void
setServerKeyVerifier
(ServerKeyVerifier serverKeyVerifier) default void
void
setUserInteraction
(UserInteraction userInteraction) 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 Details
-
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:
-
setPasswordIdentityProvider
-
addPasswordIdentity
- 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
- 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
- Parameters:
key
- TheKeyPair
to add - may not benull
Note: this key is in addition to whatever keys are available via theKeyIdentityProvider
(if any)
-
removePublicKeyIdentity
- 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
-
getUserInteraction
UserInteraction getUserInteraction()- Returns:
- A
UserInteraction
object to communicate with the user (may benull
to indicate that no such communication is allowed)
-
setUserInteraction
-
getPasswordAuthenticationReporter
PasswordAuthenticationReporter getPasswordAuthenticationReporter() -
setPasswordAuthenticationReporter
-
getPublicKeyAuthenticationReporter
PublicKeyAuthenticationReporter getPublicKeyAuthenticationReporter() -
setPublicKeyAuthenticationReporter
-
getHostBasedAuthenticationReporter
HostBasedAuthenticationReporter getHostBasedAuthenticationReporter() -
setHostBasedAuthenticationReporter
-
setUserAuthFactoriesNames
- Specified by:
setUserAuthFactoriesNames
in interfaceUserAuthFactoriesManager<ClientSession,
UserAuth, UserAuthFactory>
-