Class AbstractEncryptionAlgorithmsLookupStrategy
- java.lang.Object
-
- net.shibboleth.oidc.security.impl.AbstractEncryptionAlgorithmsLookupStrategy
-
- All Implemented Interfaces:
BiFunction<CriteriaSet,Predicate<String>,List<String>>
- Direct Known Subclasses:
DefaultDataEncryptionAlgorithmsLookupStrategy,DefaultKeyTransportEncryptionAlgorithmsLookupStrategy
public abstract class AbstractEncryptionAlgorithmsLookupStrategy extends Object implements BiFunction<CriteriaSet,Predicate<String>,List<String>>
A base class for lookup strategies that return encryption algorithms and make use of theAlgorithmRegistry.- Since:
- 2.2.0
-
-
Field Summary
Fields Modifier and Type Field Description private AlgorithmRegistryalgorithmRegistryThe AlgorithmRegistry used when processing algorithm URIs.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractEncryptionAlgorithmsLookupStrategy(AlgorithmRegistry registry)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<String>findAlgorithmIntersection(List<String> providerAlgorithms, List<String> configAlgorithms)Return a new list of algorithms that represents the set intersection of the two input algorithm lists.protected AlgorithmRegistrygetAlgorithmRegistry()Get the algorithm registry.protected Predicate<String>getAlgorithmRuntimeSupportedPredicate()Get a predicate which evaluates whether a cryptographic algorithm is supported by the runtime environment.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiFunction
andThen, apply
-
-
-
-
Field Detail
-
algorithmRegistry
@Nonnull private final AlgorithmRegistry algorithmRegistry
The AlgorithmRegistry used when processing algorithm URIs.
-
-
Constructor Detail
-
AbstractEncryptionAlgorithmsLookupStrategy
protected AbstractEncryptionAlgorithmsLookupStrategy(@Nullable AlgorithmRegistry registry)Constructor.- Parameters:
registry- the algorithm registry to used when resolving algorithm URIs. Defaults to the registry resolved viaAlgorithmSupport.getGlobalAlgorithmRegistry()
-
-
Method Detail
-
getAlgorithmRuntimeSupportedPredicate
@Nonnull protected Predicate<String> getAlgorithmRuntimeSupportedPredicate()
Get a predicate which evaluates whether a cryptographic algorithm is supported by the runtime environment.- Returns:
- the predicate
-
getAlgorithmRegistry
protected AlgorithmRegistry getAlgorithmRegistry()
Get the algorithm registry.- Returns:
- the algorithm registry
-
findAlgorithmIntersection
@Nonnull protected List<String> findAlgorithmIntersection(@Nonnull List<String> providerAlgorithms, @Nonnull List<String> configAlgorithms)
Return a new list of algorithms that represents the set intersection of the two input algorithm lists. The original order of algorithms from theconfigAlgorithmslist is preserved.- Parameters:
providerAlgorithms- the set of algorithms specified by the OpenID ProviderconfigAlgorithms- the set of algorithms specified by the IdP's configuration- Returns:
- the intersection of both lists
-
-