@FunctionalInterface public interface KeyIdentityProvider
| Modifier and Type | Field and Description |
|---|---|
static KeyIdentityProvider |
EMPTY_KEYS_PROVIDER
An "empty" implementation of
KeyIdentityProvider that returns an empty group of key pairs |
static final KeyIdentityProvider EMPTY_KEYS_PROVIDER
KeyIdentityProvider that returns an empty group of key pairsIterable<KeyPair> loadKeys(SessionContext session) 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 or session unknown).Iterable instance of available keys - ignored if nullIOException - If failed to read/parse the keys dataGeneralSecurityException - If failed to generate the keysstatic boolean isEmpty(KeyIdentityProvider provider)
provider - The KeyIdentityProvider instance to verifytrue if instance is null or the EMPTY_KEYS_PROVIDERstatic KeyIdentityProvider resolveKeyIdentityProvider(KeyIdentityProvider identities, KeyIdentityProvider keys)
Creates a "unified" KeyIdentityProvider out of 2 possible ones as follows:
null then return null.null/empty then use the non-null one.identities - The registered key pair identitieskeys - The extra available key pairsmultiProvider(KeyIdentityProvider...)static KeyIdentityProvider multiProvider(KeyIdentityProvider... providers)
KeyIdentityProvider into a single oneproviders - The providers - ignored if null/empty (i.e., returns EMPTY_KEYS_PROVIDER)multiProvider(Collection)static KeyIdentityProvider multiProvider(Collection<? extends KeyIdentityProvider> providers)
KeyIdentityProvider into a single oneproviders - The providers - ignored if null/empty (i.e., returns EMPTY_KEYS_PROVIDER)MultiKeyIdentityProviderstatic Iterable<KeyPair> iterableOf(SessionContext session, Collection<? extends KeyIdentityProvider> providers)
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).providers - The group of providers - ignored if null/empty (i.e., returns an empty iterable
instance)static KeyIdentityProvider wrapKeyPairs(KeyPair... pairs)
KeyPairs into a KeyIdentityProviderpairs - The key pairs - ignored if null/empty (i.e., returns EMPTY_KEYS_PROVIDER).static KeyIdentityProvider wrapKeyPairs(Iterable<KeyPair> pairs)
KeyPairs into a KeyIdentityProviderpairs - The key pairs Iterable - ignored if null (i.e., returns
EMPTY_KEYS_PROVIDER).static KeyPair exhaustCurrentIdentities(Iterator<KeyPair> ids)
null KeyPairids - The Iterator - ignored if null or no next element availablenull key pair found in the iterator - null if all elements exhausted
without such an entryCopyright © 2018–2024 The Apache Software Foundation. All rights reserved.