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 the
AlgorithmRegistry.- Since:
- 2.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AlgorithmRegistryThe AlgorithmRegistry used when processing algorithm URIs. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptionfindAlgorithmIntersection(List<String> providerAlgorithms, List<String> configAlgorithms) Return a new list of algorithms that represents the set intersection of the two input algorithm lists.protected AlgorithmRegistryGet the algorithm registry.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, waitMethods inherited from interface java.util.function.BiFunction
andThen, apply
-
Field Details
-
algorithmRegistry
The AlgorithmRegistry used when processing algorithm URIs.
-
-
Constructor Details
-
AbstractEncryptionAlgorithmsLookupStrategy
Constructor.- Parameters:
registry- the algorithm registry to used when resolving algorithm URIs. Defaults to the registry resolved viaAlgorithmSupport.getGlobalAlgorithmRegistry()
-
-
Method Details
-
getAlgorithmRuntimeSupportedPredicate
Get a predicate which evaluates whether a cryptographic algorithm is supported by the runtime environment.- Returns:
- the predicate
-
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
-