Top Description Methods
org.apache.sshd.client

public Interface ClientAuthenticationManager

extends UserAuthFactoriesManager<ClientSession, UserAuth, UserAuthFactory>, KeyIdentityProviderHolder
Known Direct Subinterfaces
org.apache.sshd.client.ClientFactoryManager, org.apache.sshd.client.session.ClientSession
Imports
java.security.KeyPair, java.util.Collection, .List, org.apache.sshd.client.auth.AuthenticationIdentitiesProvider, .BuiltinUserAuthFactories, .UserAuth, .UserAuthFactory, org.apache.sshd.client.auth.hostbased.HostBasedAuthenticationReporter, org.apache.sshd.client.auth.keyboard.UserInteraction, org.apache.sshd.client.auth.password.PasswordAuthenticationReporter, .PasswordIdentityProvider, org.apache.sshd.client.auth.pubkey.PublicKeyAuthenticationReporter, org.apache.sshd.client.keyverifier.ServerKeyVerifier, org.apache.sshd.client.session.ClientSession, org.apache.sshd.common.auth.UserAuthFactoriesManager, org.apache.sshd.common.keyprovider.KeyIdentityProviderHolder, org.apache.sshd.common.util.GenericUtils, .ValidateUtils

Holds information required for the client to perform authentication with the server
Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public void
addPasswordIdentity(String
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)

password
)

public void
addPublicKeyIdentity(KeyPair
The KeyPair to add - may not be null Note: this key is in addition to whatever keys are available via the org.apache.sshd.common.keyprovider.KeyIdentityProvider (if any)
key
)

public HostBasedAuthenticationReporter
public PasswordAuthenticationReporter
public PasswordIdentityProvider

Returns:

The PasswordIdentityProvider instance - ignored if null (i.e., no passwords available).
getPasswordIdentityProvider
()

Retrieve PasswordIdentityProvider used to provide password candidates

public PublicKeyAuthenticationReporter
public AuthenticationIdentitiesProvider

Returns:

The AuthenticationIdentitiesProvider to be used for attempting password or public key authentication
getRegisteredIdentities
()

public ServerKeyVerifier

Returns:

the ServerKeyVerifier to use - never null
getServerKeyVerifier
()

Retrieve the server key verifier to be used to check the key when connecting to an SSH server.

public UserInteraction

Returns:

A UserInteraction object to communicate with the user (may be null to indicate that no such communication is allowed)
getUserInteraction
()

public String

Returns:

The removed password - same one that was added via addPasswordIdentity(String) - or null if no match found
removePasswordIdentity
(String
The password to remove - ignored if null/empty
password
)

public KeyPair

Returns:

The removed KeyPair - same one that was added via addPublicKeyIdentity(KeyPair) - or null if no match found
removePublicKeyIdentity
(KeyPair
The KeyPair to remove - ignored if null
kp
)

public void
public void
public void
public void
public void
public default void
public void
Inherited from org.apache.sshd.common.auth.UserAuthFactoriesManager:
getUserAuthFactoriesgetUserAuthFactoriesNameListgetUserAuthFactoriesNamessetUserAuthFactoriessetUserAuthFactoriesNameListsetUserAuthFactoriesNames
Inherited from org.apache.sshd.common.keyprovider.KeyIdentityProviderHolder:
getKeyIdentityProvidersetKeyIdentityProvider

Method Detail

addPasswordIdentityback to summary
public void addPasswordIdentity(String password)
Parameters
password:String

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)

addPublicKeyIdentityback to summary
public void addPublicKeyIdentity(KeyPair key)
Parameters
key:KeyPair

The KeyPair to add - may not be null Note: this key is in addition to whatever keys are available via the org.apache.sshd.common.keyprovider.KeyIdentityProvider (if any)

getHostBasedAuthenticationReporterback to summary
public HostBasedAuthenticationReporter getHostBasedAuthenticationReporter()
getPasswordAuthenticationReporterback to summary
public PasswordAuthenticationReporter getPasswordAuthenticationReporter()
getPasswordIdentityProviderback to summary
public PasswordIdentityProvider getPasswordIdentityProvider()

Retrieve PasswordIdentityProvider used to provide password candidates

Returns:PasswordIdentityProvider

The PasswordIdentityProvider instance - ignored if null (i.e., no passwords available).

See Also
addPasswordIdentity(String)
getPublicKeyAuthenticationReporterback to summary
public PublicKeyAuthenticationReporter getPublicKeyAuthenticationReporter()
getRegisteredIdentitiesback to summary
public AuthenticationIdentitiesProvider getRegisteredIdentities()
Returns:AuthenticationIdentitiesProvider

The AuthenticationIdentitiesProvider to be used for attempting password or public key authentication

getServerKeyVerifierback to summary
public ServerKeyVerifier getServerKeyVerifier()

Retrieve the server key verifier to be used to check the key when connecting to an SSH server.

Returns:ServerKeyVerifier

the ServerKeyVerifier to use - never null

getUserInteractionback to summary
public UserInteraction getUserInteraction()
Returns:UserInteraction

A UserInteraction object to communicate with the user (may be null to indicate that no such communication is allowed)

removePasswordIdentityback to summary
public String removePasswordIdentity(String password)
Parameters
password:String

The password to remove - ignored if null/empty

Returns:String

The removed password - same one that was added via addPasswordIdentity(String) - or null if no match found

removePublicKeyIdentityback to summary
public KeyPair removePublicKeyIdentity(KeyPair kp)
Parameters
kp:KeyPair

The KeyPair to remove - ignored if null

Returns:KeyPair

The removed KeyPair - same one that was added via addPublicKeyIdentity(KeyPair) - or null if no match found

setHostBasedAuthenticationReporterback to summary
public void setHostBasedAuthenticationReporter(HostBasedAuthenticationReporter reporter)
setPasswordAuthenticationReporterback to summary
public void setPasswordAuthenticationReporter(PasswordAuthenticationReporter reporter)
setPasswordIdentityProviderback to summary
public void setPasswordIdentityProvider(PasswordIdentityProvider provider)
setPublicKeyAuthenticationReporterback to summary
public void setPublicKeyAuthenticationReporter(PublicKeyAuthenticationReporter reporter)
setServerKeyVerifierback to summary
public void setServerKeyVerifier(ServerKeyVerifier serverKeyVerifier)
setUserAuthFactoriesNamesback to summary
public default void setUserAuthFactoriesNames(Collection<String> names)

Implements org.apache.sshd.common.auth.UserAuthFactoriesManager.setUserAuthFactoriesNames.

Annotations
@Override
setUserInteractionback to summary
public void setUserInteraction(UserInteraction userInteraction)