@FunctionalInterface public interface PasswordIdentityProvider
Modifier and Type | Field and Description |
---|---|
static PasswordIdentityProvider |
EMPTY_PASSWORDS_PROVIDER
An "empty" implementation of
PasswordIdentityProvider that returns
and empty group of passwords |
static Function<PasswordIdentityProvider,Iterable<String>> |
LOADER
Invokes
loadPasswords() and returns the result. |
static final PasswordIdentityProvider EMPTY_PASSWORDS_PROVIDER
PasswordIdentityProvider
that returns
and empty group of passwordsstatic final Function<PasswordIdentityProvider,Iterable<String>> LOADER
loadPasswords()
and returns the result.
Ignores null
providers (i.e., returns an empty iterable instance)Iterable<String> loadPasswords()
null
static Iterator<String> iteratorOf(PasswordIdentityProvider identities, PasswordIdentityProvider passwords)
Iterator
of passwords out of 2 possible
PasswordIdentityProvider
identities
- The registered passwordspasswords
- Extra available passwordsresolvePasswordIdentityProvider(PasswordIdentityProvider, PasswordIdentityProvider)
static Iterator<String> iteratorOf(PasswordIdentityProvider provider)
null
iterator of the available passwordsprovider
- The PasswordIdentityProvider
- ignored if null
(i.e.,
return an empty iterator)null
iterator - which may be empty if no provider or no passwordsstatic PasswordIdentityProvider resolvePasswordIdentityProvider(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.identities
- The registered passwordspasswords
- The extra available passwordsmultiProvider(PasswordIdentityProvider...)
static PasswordIdentityProvider multiProvider(PasswordIdentityProvider... providers)
PasswordIdentityProvider
into a single oneproviders
- The providers - ignored if null
/empty (i.e., returns
EMPTY_PASSWORDS_PROVIDER
multiProvider(Collection)
static PasswordIdentityProvider multiProvider(Collection<? extends PasswordIdentityProvider> providers)
PasswordIdentityProvider
into a single oneproviders
- The providers - ignored if null
/empty (i.e., returns
EMPTY_PASSWORDS_PROVIDER
static Iterable<String> iterableOf(Collection<? extends PasswordIdentityProvider> providers)
PasswordIdentityProvider
into an Iterable
of their combined passwordsproviders
- The providers - ignored if null
/empty (i.e., returns an empty iterable instance)static PasswordIdentityProvider wrapPasswords(String... passwords)
PasswordIdentityProvider
passwords
- The passwords - ignored if null
/empty
(i.e., returns EMPTY_PASSWORDS_PROVIDER
)static PasswordIdentityProvider wrapPasswords(Iterable<String> passwords)
PasswordIdentityProvider
passwords
- The passwords Iterable
- ignored if null
(i.e., returns EMPTY_PASSWORDS_PROVIDER
)Copyright © 2008–2022 The Apache Software Foundation. All rights reserved.