public interface ClientIdentityLoader
| Modifier and Type | Field and Description |
|---|---|
static ClientIdentityLoader |
DEFAULT
A default implementation that assumes a file location that must exist.
|
| Modifier and Type | Method and Description |
|---|---|
static KeyIdentityProvider |
asKeyIdentityProvider(ClientIdentityLoader loader,
Collection<? extends NamedResource> locations,
FilePasswordProvider passwordProvider,
boolean ignoreNonExisting)
Uses the provided
ClientIdentityLoader to lazy load the keys locations |
boolean |
isValidLocation(NamedResource location) |
Iterable<KeyPair> |
loadClientIdentities(SessionContext session,
NamedResource location,
FilePasswordProvider provider) |
static final ClientIdentityLoader DEFAULT
A default implementation that assumes a file location that must exist.
Note: It calls SecurityUtils.loadKeyPairIdentities(SessionContext, NamedResource, InputStream, FilePasswordProvider)
boolean isValidLocation(NamedResource location) throws IOException
location - The identity key-pair location - the actual meaning (file, URL, etc.)
depends on the implementation.true if it represents a valid location - the actual meaning of
the validity depends on the implementationIOException - If failed to validate the locationIterable<KeyPair> loadClientIdentities(SessionContext session, NamedResource location, FilePasswordProvider provider) throws IOException, GeneralSecurityException
session - The SessionContext for invoking this load command - may
be null if not invoked within a session context (e.g., offline tool).location - The identity key-pair location - the actual meaning (file, URL, etc.)
depends on the implementation.provider - The FilePasswordProvider to consult if the location contains
an encrypted identityKeyPair - null if location is empty
and it is OK that it does not existIOException - If failed to access / process the remote locationGeneralSecurityException - If failed to convert the contents into
a valid identitystatic KeyIdentityProvider asKeyIdentityProvider(ClientIdentityLoader loader, Collection<? extends NamedResource> locations, FilePasswordProvider passwordProvider, boolean ignoreNonExisting)
ClientIdentityLoader to lazy load the keys locationsloader - The loader instance to uselocations - The locations to load - ignored if null/emptypasswordProvider - The FilePasswordProvider to use if any
encrypted keys foundignoreNonExisting - Whether to ignore non existing locations as indicated
by isValidLocation(NamedResource)KeyIdentityProvider wrapperCopyright © 2018–2019 The Apache Software Foundation. All rights reserved.