Class ClientAuthenticationConfigurationLookupFunction
java.lang.Object
net.shibboleth.idp.plugin.authn.oidc.rp.security.impl.ClientAuthenticationConfigurationLookupFunction
- All Implemented Interfaces:
Function<MessageContext,,List<SignatureSigningConfiguration>> ContextDataLookupFunction<MessageContext,List<SignatureSigningConfiguration>>
public class ClientAuthenticationConfigurationLookupFunction
extends Object
implements ContextDataLookupFunction<MessageContext,List<SignatureSigningConfiguration>>
A function that returns a
SignatureSigningConfiguration list for signing client authentication JWTs.
The configuration list is taken from the active security configuration, but the algorithms are filtered to only allow those that are compatible with the client authentication type chosen. For example, the HMAC family of algorithms if the client_secret_jwt method is used.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private static final ParentProfileRequestContextLookup<MessageContext>Lookup function for parent ProfileRequestContext.Strategy used to locate theRelyingPartyContextassociated with a givenProfileRequestContext. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(MessageContext input) createSignatureSigningConfiguration(SignatureSigningConfiguration signingConfig, List<String> algorithms) Create a copy of the signature signing configuration given, but replace the algorithms with those input.filterAlgorithmsAgainstFamily(com.nimbusds.jose.JWSAlgorithm.Family algFamily, List<String> algorithms) Filter out any algorithms in the list that are not from the given algorithm family.voidSet the strategy used to locate theRelyingPartyContextassociated with a givenProfileRequestContext.
-
Field Details
-
PRC_LOOKUP
Lookup function for parent ProfileRequestContext. -
log
@Nonnull private final org.slf4j.Logger logClass logger. -
relyingPartyContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategyStrategy used to locate theRelyingPartyContextassociated with a givenProfileRequestContext.
-
-
Constructor Details
-
ClientAuthenticationConfigurationLookupFunction
public ClientAuthenticationConfigurationLookupFunction()Constructor.
-
-
Method Details
-
setRelyingPartyContextLookupStrategy
public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext, RelyingPartyContext> strategy) Set the strategy used to locate theRelyingPartyContextassociated with a givenProfileRequestContext.- Parameters:
strategy- lookup strategy
-
apply
@Nonnull @NonnullElements @NotLive @Unmodifiable public List<SignatureSigningConfiguration> apply(@Nullable MessageContext input) - Specified by:
applyin interfaceFunction<MessageContext,List<SignatureSigningConfiguration>>
-
filterAlgorithmsAgainstFamily
@Nonnull @NonnullElements @NotLive @Unmodifiable private List<String> filterAlgorithmsAgainstFamily(@Nonnull com.nimbusds.jose.JWSAlgorithm.Family algFamily, @Nullable List<String> algorithms) Filter out any algorithms in the list that are not from the given algorithm family.- Parameters:
algFamily- the algorithm family to filter onalgorithms- the algorithms to filter- Returns:
- a filtered list of algorithms
-
createSignatureSigningConfiguration
@Nonnull private BasicSignatureSigningConfiguration createSignatureSigningConfiguration(@Nonnull SignatureSigningConfiguration signingConfig, @Nonnull List<String> algorithms) Create a copy of the signature signing configuration given, but replace the algorithms with those input.- Parameters:
signingConfig- the signature signing configuration to copyalgorithms- the algorithms to add into the copied configuration- Returns:
- a copied signature signing configuration with the algorithms input
-