public class LazyClientKeyIdentityProvider extends Object implements KeyIdentityProvider, ClientIdentityLoaderHolder, FilePasswordProviderHolder
EMPTY_KEYS_PROVIDER
Constructor and Description |
---|
LazyClientKeyIdentityProvider(ClientIdentityLoader loader,
Collection<? extends NamedResource> locations,
FilePasswordProvider passwordProvider,
boolean ignoreNonExisting) |
Modifier and Type | Method and Description |
---|---|
ClientIdentityLoader |
getClientIdentityLoader() |
FilePasswordProvider |
getFilePasswordProvider() |
Collection<? extends NamedResource> |
getLocations() |
boolean |
isIgnoreNonExisting() |
protected Iterable<KeyPair> |
loadClientIdentities(SessionContext session,
NamedResource location) |
Iterable<KeyPair> |
loadKeys(SessionContext session)
Load available keys.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exhaustCurrentIdentities, isEmpty, iterableOf, multiProvider, multiProvider, resolveKeyIdentityProvider, wrapKeyPairs, wrapKeyPairs
loaderHolderOf
providerHolderOf
public LazyClientKeyIdentityProvider(ClientIdentityLoader loader, Collection<? extends NamedResource> locations, FilePasswordProvider passwordProvider, boolean ignoreNonExisting)
public ClientIdentityLoader getClientIdentityLoader()
getClientIdentityLoader
in interface ClientIdentityLoaderHolder
ClientIdentityLoader
to use in order to load client key pair identities - never null
public Collection<? extends NamedResource> getLocations()
public FilePasswordProvider getFilePasswordProvider()
getFilePasswordProvider
in interface FilePasswordProviderHolder
FilePasswordProvider
to use if need to load encrypted identities keys - never null
FilePasswordProvider.EMPTY
public boolean isIgnoreNonExisting()
public Iterable<KeyPair> loadKeys(SessionContext session) throws IOException, GeneralSecurityException
KeyIdentityProvider
loadKeys
in interface KeyIdentityProvider
session
- 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 null
IOException
- If failed to read/parse the keys dataGeneralSecurityException
- If failed to generate the keysprotected Iterable<KeyPair> loadClientIdentities(SessionContext session, NamedResource location) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.