@FunctionalInterface public interface PasswordIdentityProvider
| Modifier and Type | Field and Description |
|---|---|
static PasswordIdentityProvider |
EMPTY_PASSWORDS_PROVIDER
An "empty" implementation of
PasswordIdentityProvider that returns an empty group of passwords |
static final PasswordIdentityProvider EMPTY_PASSWORDS_PROVIDER
PasswordIdentityProvider that returns an empty group of passwordsIterable<String> loadPasswords(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).nullIOException - If failed to load the passwordsGeneralSecurityException - If some security issue with the passwordsstatic Iterator<String> iteratorOf(SessionContext session, PasswordIdentityProvider identities, PasswordIdentityProvider passwords) throws IOException, GeneralSecurityException
Iterator of passwords out of 2 possible PasswordIdentityProvidersession - The SessionContext for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool).identities - The registered passwordspasswords - Extra available passwordsIOException - If failed to load the passwordsGeneralSecurityException - If some security issue with the passwordsresolvePasswordIdentityProvider(SessionContext, PasswordIdentityProvider,
PasswordIdentityProvider)static Iterator<String> iteratorOf(SessionContext session, PasswordIdentityProvider provider) throws IOException, GeneralSecurityException
null iterator of the available passwordssession - The SessionContext for invoking this load command - may be null
if not invoked within a session context (e.g., offline tool).provider - The PasswordIdentityProvider - ignored if null (i.e., return an
empty iterator)null iterator - which may be empty if no provider or no passwordsIOException - If failed to load the passwordsGeneralSecurityException - If some security issue with the passwordsstatic PasswordIdentityProvider resolvePasswordIdentityProvider(SessionContext session, PasswordIdentityProvider identities, PasswordIdentityProvider passwords)
Creates a "unified" PasswordIdentityProvider out of 2 possible ones as follows:
null then return null.null then use the non-null one.session - The SessionContext for invoking this load command - may be null if not invoked
within a session context (e.g., offline tool).identities - The registered passwordspasswords - The extra available passwordsmultiProvider(SessionContext, PasswordIdentityProvider...)static PasswordIdentityProvider multiProvider(SessionContext session, PasswordIdentityProvider... providers)
PasswordIdentityProvider into a single onesession - The SessionContext for invoking this load command - may be null if not invoked
within a session context (e.g., offline tool).providers - The providers - ignored if null/empty (i.e., returns EMPTY_PASSWORDS_PROVIDERmultiProvider(SessionContext, Collection)static PasswordIdentityProvider multiProvider(SessionContext session, Collection<? extends PasswordIdentityProvider> providers)
PasswordIdentityProvider into a single onesession - The SessionContext for invoking this load command - may be null if not invoked
within a session context (e.g., offline tool).providers - The providers - ignored if null/empty (i.e., returns EMPTY_PASSWORDS_PROVIDERstatic Iterable<String> iterableOf(SessionContext session, Collection<? extends PasswordIdentityProvider> providers)
PasswordIdentityProvider into an Iterable of their combined passwordssession - The SessionContext for invoking this load command - may be null if not invoked
within a session context (e.g., offline tool).providers - The providers - ignored if null/empty (i.e., returns an empty iterable instance)static PasswordIdentityProvider wrapPasswords(String... passwords)
PasswordIdentityProviderpasswords - The passwords - ignored if null/empty (i.e., returns EMPTY_PASSWORDS_PROVIDER)static PasswordIdentityProvider wrapPasswords(Iterable<String> passwords)
PasswordIdentityProviderpasswords - The passwords Iterable - ignored if null (i.e., returns
EMPTY_PASSWORDS_PROVIDER)Copyright © 2018–2024 The Apache Software Foundation. All rights reserved.