Class ProviderMetadataDataEncryptionAlgorithmsLookupStrategy
- java.lang.Object
-
- net.shibboleth.oidc.security.impl.AbstractEncryptionAlgorithmsLookupStrategy
-
- net.shibboleth.oidc.security.jose.impl.DefaultDataEncryptionAlgorithmsLookupStrategy
-
- net.shibboleth.oidc.security.jose.impl.ProviderMetadataDataEncryptionAlgorithmsLookupStrategy
-
- All Implemented Interfaces:
BiFunction<CriteriaSet,Predicate<String>,List<String>>
public class ProviderMetadataDataEncryptionAlgorithmsLookupStrategy extends DefaultDataEncryptionAlgorithmsLookupStrategy
A lookup strategy that finds data/content encryption algorithms from local configuration that are compatible with those advertised by the OpenID Provider.The set of supported and configured encryption methods ('enc') 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 encryption method 'enc' 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 encryption methods are returned (a failure).
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogLogger.private Function<com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata,List<String>>providerEncryptionMethodsLookupStrategyA strategy to locate the encryption methods ('enc') appropriate for the JWT to be encrypted.
-
Constructor Summary
Constructors Constructor Description ProviderMetadataDataEncryptionAlgorithmsLookupStrategy(Function<com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata,List<String>> strategy)Constructor.ProviderMetadataDataEncryptionAlgorithmsLookupStrategy(Function<com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata,List<String>> strategy, AlgorithmRegistry registry)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>apply(CriteriaSet criteria, Predicate<String> includeExcludePredicate)-
Methods inherited from class net.shibboleth.oidc.security.jose.impl.DefaultDataEncryptionAlgorithmsLookupStrategy
getDataEncryptionAlgorithmsFromConfiguration
-
Methods inherited from class net.shibboleth.oidc.security.impl.AbstractEncryptionAlgorithmsLookupStrategy
findAlgorithmIntersection, getAlgorithmRegistry, getAlgorithmRuntimeSupportedPredicate
-
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
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Logger.
-
providerEncryptionMethodsLookupStrategy
@Nonnull private final Function<com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata,List<String>> providerEncryptionMethodsLookupStrategy
A strategy to locate the encryption methods ('enc') appropriate for the JWT to be encrypted. Can returnnullif the metadata does not describe its support algorithms (which is optional).
-
-
Constructor Detail
-
ProviderMetadataDataEncryptionAlgorithmsLookupStrategy
public ProviderMetadataDataEncryptionAlgorithmsLookupStrategy(@Nonnull @ParameterName(name="providerEncryptionMethodsLookupStrategy") Function<com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata,List<String>> strategy, @Nullable @ParameterName(name="AlgorithmRegistry") AlgorithmRegistry registry)
Constructor.- Parameters:
strategy- the strategy used to locate the encryption methods ('enc') from the OpenID Provider metadata appropriate for the JWT to be encrypted.registry- the algorithm registry to used when resolving algorithm URIs. Can benull.
-
ProviderMetadataDataEncryptionAlgorithmsLookupStrategy
public ProviderMetadataDataEncryptionAlgorithmsLookupStrategy(@Nonnull @ParameterName(name="providerKeyTransportAlgorithmsLookupStrategy") Function<com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata,List<String>> strategy)
Constructor.- Parameters:
strategy- the strategy used to locate the encryption methods ('enc') from the OpenID Provider metadata appropriate for the JWT to be encrypted.
-
-
Method Detail
-
apply
public List<String> apply(CriteriaSet criteria, Predicate<String> includeExcludePredicate)
- Specified by:
applyin interfaceBiFunction<CriteriaSet,Predicate<String>,List<String>>- Overrides:
applyin classDefaultDataEncryptionAlgorithmsLookupStrategy
-
-