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
Modifier and TypeMethodDescriptionvoidaddPasswordIdentity(String password) voidRetrievePasswordIdentityProviderused to provide password candidatesRetrieve the server key verifier to be used to check the key when connecting to an SSH server.removePasswordIdentity(String password) voidvoidsetServerKeyVerifier(ServerKeyVerifier serverKeyVerifier) default voidvoidsetUserInteraction(UserInteraction userInteraction) Methods inherited from interface org.apache.sshd.common.keyprovider.KeyIdentityProviderHolder
getKeyIdentityProvider, setKeyIdentityProviderMethods inherited from interface org.apache.sshd.common.auth.UserAuthFactoriesManager
getUserAuthFactories, getUserAuthFactoriesNameList, getUserAuthFactoriesNames, setUserAuthFactories, setUserAuthFactoriesNameList, setUserAuthFactoriesNames
-
Method Details
-
getRegisteredIdentities
AuthenticationIdentitiesProvider getRegisteredIdentities()- Returns:
- The
AuthenticationIdentitiesProviderto be used for attempting password or public key authentication
-
getPasswordIdentityProvider
PasswordIdentityProvider getPasswordIdentityProvider()RetrievePasswordIdentityProviderused to provide password candidates- Returns:
- The
PasswordIdentityProviderinstance - 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)- ornullif no match found
-
addPublicKeyIdentity
- Parameters:
key- TheKeyPairto add - may not benullNote: this key is in addition to whatever keys are available via theKeyIdentityProvider(if any)
-
removePublicKeyIdentity
- Parameters:
kp- TheKeyPairto remove - ignored ifnull- Returns:
- The removed
KeyPair- same one that was added viaaddPublicKeyIdentity(KeyPair)- ornullif 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
ServerKeyVerifierto use - nevernull
-
setServerKeyVerifier
-
getUserInteraction
UserInteraction getUserInteraction()- Returns:
- A
UserInteractionobject to communicate with the user (may benullto indicate that no such communication is allowed)
-
setUserInteraction
-
setUserAuthFactoriesNames
- Specified by:
setUserAuthFactoriesNamesin interfaceUserAuthFactoriesManager<ClientSession,UserAuth, UserAuthFactory>
-