Class ProviderMetadataKeyTransportEncryptionAlgorithmsLookupStrategy
java.lang.Object
net.shibboleth.oidc.security.impl.AbstractEncryptionAlgorithmsLookupStrategy
net.shibboleth.oidc.security.jose.impl.DefaultKeyTransportEncryptionAlgorithmsLookupStrategy
net.shibboleth.oidc.security.jose.impl.ProviderMetadataKeyTransportEncryptionAlgorithmsLookupStrategy
- All Implemented Interfaces:
BiFunction<CriteriaSet,Predicate<String>, List<String>>
public class ProviderMetadataKeyTransportEncryptionAlgorithmsLookupStrategy
extends DefaultKeyTransportEncryptionAlgorithmsLookupStrategy
A lookup strategy that finds key transport algorithms from local configuration that are compatible with those
advertised by the downstream OpenID Provider.
The set of supported and configured key transport ('alg') algorithms are derived from the intersection of those supported by local configuration and those supported by the downstream OpenID Provider. The order of those algorithms in the local configuration are preserved. As algorithm 'alg' support is optional in provider metadata, failure to locate them will result in the default behaviour of the parent class being applied (resolve from local configuration). If they are present, but are not compatible with the set configured in the encryption configuration, no algorithms are returned (a failure).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerLogger.private final Function<OIDCProviderMetadata,List<String>> A strategy to locate the algorithms ('alg') appropriate for the JWT to be encrypted. -
Constructor Summary
ConstructorsConstructorDescriptionProviderMetadataKeyTransportEncryptionAlgorithmsLookupStrategy(Function<OIDCProviderMetadata, List<String>> strategy) Constructor.ProviderMetadataKeyTransportEncryptionAlgorithmsLookupStrategy(Function<OIDCProviderMetadata, List<String>> strategy, AlgorithmRegistry registry) Constructor. -
Method Summary
Methods inherited from class net.shibboleth.oidc.security.jose.impl.DefaultKeyTransportEncryptionAlgorithmsLookupStrategy
getKeyTransportAlgorithmsFromConfigurationMethods inherited from class net.shibboleth.oidc.security.impl.AbstractEncryptionAlgorithmsLookupStrategy
findAlgorithmIntersection, getAlgorithmRegistry, getAlgorithmRuntimeSupportedPredicateMethods 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
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logLogger. -
providerKeyTransportAlgorithmsLookupStrategy
@Nonnull private final Function<OIDCProviderMetadata,List<String>> providerKeyTransportAlgorithmsLookupStrategyA strategy to locate the algorithms ('alg') appropriate for the JWT to be encrypted. Can returnnullif the metadata does not describe its supported algorithms (which is optional).
-
-
Constructor Details
-
ProviderMetadataKeyTransportEncryptionAlgorithmsLookupStrategy
public ProviderMetadataKeyTransportEncryptionAlgorithmsLookupStrategy(@Nonnull @ParameterName(name="providerKeyTransportAlgorithmsLookupStrategy") Function<OIDCProviderMetadata, List<String>> strategy, @Nullable @ParameterName(name="AlgorithmRegistry") AlgorithmRegistry registry) Constructor.- Parameters:
strategy- the strategy used to locate the algorithms ('alg') from the OpenID Provider metadata appropriate for the JWT to be encrypted.registry- the algorithm registry to used when resolving algorithm URIs. Can benull.
-
ProviderMetadataKeyTransportEncryptionAlgorithmsLookupStrategy
public ProviderMetadataKeyTransportEncryptionAlgorithmsLookupStrategy(@Nonnull @ParameterName(name="providerKeyTransportAlgorithmsLookupStrategy") Function<OIDCProviderMetadata, List<String>> strategy) Constructor.- Parameters:
strategy- the strategy used to locate the algorithms ('alg') from the OpenID Provider metadata appropriate for the JWT to be encrypted.
-
-
Method Details