Package org.apache.sshd.client.auth
Interface AuthenticationIdentitiesProvider
-
- All Superinterfaces:
KeyIdentityProvider
,PasswordIdentityProvider
public interface AuthenticationIdentitiesProvider extends KeyIdentityProvider, PasswordIdentityProvider
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<java.lang.Object>
KEYPAIR_IDENTITY_COMPARATOR
Compares 2KeyPair
identities - returns zero ONLY if both compared objects areKeyPair
s and equal to each otherstatic java.util.Comparator<java.lang.Object>
PASSWORD_IDENTITY_COMPARATOR
Compares 2 password identities - returns zero ONLY if both compared objects areString
s and equal to each other-
Fields inherited from interface org.apache.sshd.common.keyprovider.KeyIdentityProvider
EMPTY_KEYS_PROVIDER
-
Fields inherited from interface org.apache.sshd.client.auth.password.PasswordIdentityProvider
EMPTY_PASSWORDS_PROVIDER
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static int
findIdentityIndex(java.util.List<?> identities, java.util.Comparator<? super java.lang.Object> comp, java.lang.Object target)
java.lang.Iterable<?>
loadIdentities(SessionContext session)
static AuthenticationIdentitiesProvider
wrapIdentities(java.lang.Iterable<?> identities)
-
Methods inherited from interface org.apache.sshd.common.keyprovider.KeyIdentityProvider
loadKeys
-
Methods inherited from interface org.apache.sshd.client.auth.password.PasswordIdentityProvider
loadPasswords
-
-
-
-
Field Detail
-
PASSWORD_IDENTITY_COMPARATOR
static final java.util.Comparator<java.lang.Object> PASSWORD_IDENTITY_COMPARATOR
Compares 2 password identities - returns zero ONLY if both compared objects areString
s and equal to each other
-
KEYPAIR_IDENTITY_COMPARATOR
static final java.util.Comparator<java.lang.Object> KEYPAIR_IDENTITY_COMPARATOR
Compares 2KeyPair
identities - returns zero ONLY if both compared objects areKeyPair
s and equal to each other
-
-
Method Detail
-
loadIdentities
java.lang.Iterable<?> loadIdentities(SessionContext session) throws java.io.IOException, java.security.GeneralSecurityException
- Parameters:
session
- TheSessionContext
for invoking this load command - may benull
if not invoked within a session context (e.g., offline tool).- Returns:
- All the currently available identities - passwords, keys, etc...
- Throws:
java.io.IOException
- If failed to load the identitiesjava.security.GeneralSecurityException
- If some security issue with the identities (e.g., keys)
-
findIdentityIndex
static int findIdentityIndex(java.util.List<?> identities, java.util.Comparator<? super java.lang.Object> comp, java.lang.Object target)
-
wrapIdentities
static AuthenticationIdentitiesProvider wrapIdentities(java.lang.Iterable<?> identities)
- Parameters:
identities
- TheIterable
identities - OK ifnull
/empty- Returns:
- An
AuthenticationIdentitiesProvider
wrapping the identities
-
-