public class MappedKeyPairProvider extends Object implements KeyPairProvider
| Modifier and Type | Field and Description |
|---|---|
static Function<Map<String,KeyPair>,KeyPairProvider> |
MAP_TO_KEY_PAIR_PROVIDER
Transforms a
Map of String->KeyPair to a KeyPairProvider where map key is the
type and value is the associated KeyPair |
ECDSA_SHA2_NISTP256, ECDSA_SHA2_NISTP384, ECDSA_SHA2_NISTP521, EMPTY_KEYPAIR_PROVIDER, SSH_DSS, SSH_DSS_CERT, SSH_ECDSA_SHA2_NISTP256_CERT, SSH_ECDSA_SHA2_NISTP384_CERT, SSH_ECDSA_SHA2_NISTP521_CERT, SSH_ED25519, SSH_ED25519_CERT, SSH_RSA, SSH_RSA_CERTEMPTY_KEYS_PROVIDER| Constructor and Description |
|---|
MappedKeyPairProvider(Collection<? extends KeyPair> pairs) |
MappedKeyPairProvider(KeyPair... pairs) |
MappedKeyPairProvider(Map<String,KeyPair> pairsMap) |
| Modifier and Type | Method and Description |
|---|---|
Iterable<String> |
getKeyTypes(SessionContext session) |
KeyPair |
loadKey(SessionContext session,
String type)
Load a key of the specified type which can be "ssh-rsa", "ssh-dss", or
"ecdsa-sha2-nistp{256,384,521}".
|
Iterable<KeyPair> |
loadKeys(SessionContext session)
Load available keys.
|
static Map<String,KeyPair> |
mapUniquePairs(Collection<? extends KeyPair> pairs) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitwrap, wrapexhaustCurrentIdentities, isEmpty, iterableOf, multiProvider, multiProvider, resolveKeyIdentityProvider, wrapKeyPairs, wrapKeyPairspublic static final Function<Map<String,KeyPair>,KeyPairProvider> MAP_TO_KEY_PAIR_PROVIDER
Map of String->KeyPair to a KeyPairProvider where map key is the
type and value is the associated KeyPairpublic MappedKeyPairProvider(KeyPair... pairs)
public MappedKeyPairProvider(Collection<? extends KeyPair> pairs)
public Iterable<KeyPair> loadKeys(SessionContext session)
KeyIdentityProviderloadKeys in interface KeyIdentityProvidersession - The SessionContext for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool or session unknown).Iterable instance of available keys - ignored if nullpublic KeyPair loadKey(SessionContext session, String type)
KeyPairProvidernullloadKey in interface KeyPairProvidersession - The SessionContext for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool).type - the type of key to loadnull if this type of key is not availablepublic Iterable<String> getKeyTypes(SessionContext session)
getKeyTypes in interface KeyPairProvidersession - The SessionContext for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool).Iterable key types - never nullpublic static Map<String,KeyPair> mapUniquePairs(Collection<? extends KeyPair> pairs)
Copyright © 2018–2020 The Apache Software Foundation. All rights reserved.