Class AlgorithmInfoMetadataValueResolver
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.plugin.oidc.op.metadata.impl.AlgorithmInfoMetadataValueResolver
- All Implemented Interfaces:
MetadataValueResolver,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,Resolver<Object,ProfileRequestContext>
public class AlgorithmInfoMetadataValueResolver
extends AbstractIdentifiableInitializableComponent
implements MetadataValueResolver
A
MetadataValueResolver for resolving signing/encryption algorithm information from the current
SecurityConfiguration.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.Strategy used to locate theRelyingPartyContextassociated with a givenProfileRequestContext.private booleanWhether to resolve data and key transport encryption algorithms.private booleanWhether to resolve key transport encryption algorithms. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidpopulateAlgorithmsAgainstPolicy(List<String> algorithms, List<String> candidates, AlgorithmPolicyConfiguration policy) Verifies the candidates against given policy (inclusion/exclusion) and adds the passed ones to the given list.resolve(ProfileRequestContext profileRequestContext) resolveSingle(ProfileRequestContext profileRequestContext) voidSet the strategy used to locate theRelyingPartyContextassociated with a givenProfileRequestContext.voidsetResolveEncryptionAlgs(boolean flag) Set whether to resolve data encryption algorithms.voidsetResolveKeyTransportEncAlgs(boolean flag) Set whether to resolve key transport algorithms.Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
relyingPartyContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategyStrategy used to locate theRelyingPartyContextassociated with a givenProfileRequestContext. -
resolveEncryptionAlgs
private boolean resolveEncryptionAlgsWhether to resolve data and key transport encryption algorithms. Defaults to false, when signature algorithms are resolved. -
resolveKeyTransportEncAlgs
private boolean resolveKeyTransportEncAlgsWhether to resolve key transport encryption algorithms. Defaults to false, when data encryption algorithms are resolved. This flag is only used when resolveEncryptionAlgs is enabled.
-
-
Constructor Details
-
AlgorithmInfoMetadataValueResolver
public AlgorithmInfoMetadataValueResolver()Constructor.
-
-
Method Details
-
setRelyingPartyContextLookupStrategy
public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext, RelyingPartyContext> strategy) Set the strategy used to locate theRelyingPartyContextassociated with a givenProfileRequestContext.- Parameters:
strategy- strategy used to locate theRelyingPartyContextassociated with a givenProfileRequestContext
-
setResolveEncryptionAlgs
public void setResolveEncryptionAlgs(boolean flag) Set whether to resolve data encryption algorithms. When set to false, signature algorithms are resolved.- Parameters:
flag- What to set.
-
setResolveKeyTransportEncAlgs
public void setResolveKeyTransportEncAlgs(boolean flag) Set whether to resolve key transport algorithms. Defaults to false, when data encryption algorithms are resolved. In any case, resolveEncryptionAlgs must be enabled.- Parameters:
flag- What to set.
-
resolve
public Iterable<Object> resolve(ProfileRequestContext profileRequestContext) throws ResolverException - Specified by:
resolvein interfaceResolver<Object,ProfileRequestContext> - Throws:
ResolverException
-
populateAlgorithmsAgainstPolicy
protected void populateAlgorithmsAgainstPolicy(List<String> algorithms, List<String> candidates, AlgorithmPolicyConfiguration policy) Verifies the candidates against given policy (inclusion/exclusion) and adds the passed ones to the given list.- Parameters:
algorithms- the list where to store the passed candidatescandidates- the candidates to be verifiedpolicy- the policy to be verified against
-
resolveSingle
public Object resolveSingle(@Nullable ProfileRequestContext profileRequestContext) throws ResolverException - Specified by:
resolveSinglein interfaceResolver<Object,ProfileRequestContext> - Throws:
ResolverException
-