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 Details

    • algorithmRegistry

      @Nonnull private final AlgorithmRegistry algorithmRegistry
      The AlgorithmRegistry used when processing algorithm URIs.
  • Constructor Details

    • AbstractEncryptionAlgorithmsLookupStrategy

      protected AbstractEncryptionAlgorithmsLookupStrategy(@Nullable AlgorithmRegistry registry)
      Constructor.
      Parameters:
      registry - the algorithm registry to used when resolving algorithm URIs. Defaults to the registry resolved via AlgorithmSupport.getGlobalAlgorithmRegistry()
  • Method Details

    • 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

      @Nonnull 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 the configAlgorithms list is preserved.
      Parameters:
      providerAlgorithms - the set of algorithms specified by the OpenID Provider
      configAlgorithms - the set of algorithms specified by the IdP's configuration
      Returns:
      the intersection of both lists