Class ClientInformationSignatureSigningParametersResolver
java.lang.Object
org.opensaml.xmlsec.impl.AbstractSecurityParametersResolver<SignatureSigningParameters>
net.shibboleth.oidc.security.jose.impl.BasicSignatureSigningParametersResolver
net.shibboleth.oidc.security.jose.impl.ClientInformationSignatureSigningParametersResolver
- All Implemented Interfaces:
SignatureSigningParametersResolver,Resolver<SignatureSigningParameters,CriteriaSet>
public class ClientInformationSignatureSigningParametersResolver
extends BasicSignatureSigningParametersResolver
implements SignatureSigningParametersResolver
An implementation of an
SignatureSigningParametersResolver that extends the BasicSignatureSigningParametersResolver functionality by adding a configurable lookup strategy for fetching
the desired algorithm value from OIDCClientInformation. It is expected to be found from the criteria set.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe default algorithm value used if lookup strategy returned null.private final org.slf4j.LoggerClass logger.private final Function<OIDCClientInformation,String> A lookup function for the signature algorithm. -
Constructor Summary
ConstructorsConstructorDescriptionClientInformationSignatureSigningParametersResolver(Function<OIDCClientInformation, String> strategy, String defaultValue) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionconvertIntoListIfEnabled(String algorithm, List<String> enabledAlgorithms) Returns the given algorithm in aListif it was enabled in the list of enabled algorithms.protected OIDCClientInformationgetClientInformation(CriteriaSet criteria) Returns the client information from the given criteria set, if one was found.getEffectiveSignatureAlgorithms(CriteriaSet criteria, Predicate<String> includeExcludePredicate) Get the effective list of signature algorithm URIs to consider, including application of include/exclude policy.protected List<Credential>getEffectiveSigningCredentials(CriteriaSet criteria) Get the effective list of signing credentials to consider.Methods inherited from class net.shibboleth.oidc.security.jose.impl.BasicSignatureSigningParametersResolver
credentialSupportsSigningAlgorithm, findCompatibleAlgorithmAndCredential, getAlgorithmRegistry, getAlgorithmRuntimeSupportedPredicate, getIncludeExcludePredicate, logResult, resolve, resolveAndPopulateCredentialAndSignatureAlgorithm, resolveSingle, setAlgorithmRegistry, validateMethods inherited from class org.opensaml.xmlsec.impl.AbstractSecurityParametersResolver
lookupKeyInfoGenerator, resolveAndPopulateIncludesExcludes, resolveEffectiveExcludes, resolveEffectiveIncludes, resolveIncludeExcludePrecedence, resolveIncludeExcludePredicateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.resolver.Resolver
resolve, resolveSingle
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
signatureAlgorithmLookupStrategy
A lookup function for the signature algorithm. -
defaultAlgorithmValue
The default algorithm value used if lookup strategy returned null.
-
-
Constructor Details
-
ClientInformationSignatureSigningParametersResolver
public ClientInformationSignatureSigningParametersResolver(@Nonnull @ParameterName(name="signatureAlgorithmLookupStrategy") Function<OIDCClientInformation, String> strategy, @Nullable @ParameterName(name="defaultAlgorithmValue") String defaultValue) Constructor.- Parameters:
strategy- a lookup function for the signature algorithmdefaultValue- the default algorithm value used if lookup strategy returned null
-
-
Method Details
-
convertIntoListIfEnabled
@Nonnull protected List<String> convertIntoListIfEnabled(@Nonnull String algorithm, @Nonnull List<String> enabledAlgorithms) Returns the given algorithm in aListif it was enabled in the list of enabled algorithms. An empty list is returned if the algorithm was not enabled.- Parameters:
algorithm- the algorithm to be checked against the listenabledAlgorithms- the list of enabled algorithms- Returns:
- the given algorithm as list if it was enabled, or an empty list if not