Class PopulateECPContext
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
org.opensaml.saml.saml2.profile.impl.PopulateECPContext
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction
Action to create and populate an
ECPContext based on the request and, when encryption is in use,
generating a session key.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<ProfileRequestContext,ECPContext> Strategy used to locate theECPContextto populate.Strategy used to locate theEncryptionContext.private final org.slf4j.LoggerClass logger.private SecureRandomRandom number generator.private booleanOnly generate a key if encryption is expected. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) Performs this action.voidSet the strategy used to locate theECPContextto operate on.voidSet the strategy used to locate theEncryptionContext.voidsetRandomGenerator(SecureRandom generator) Set the source of randomness to use, or none to bypass key generation.voidsetRequireEncryption(boolean flag) Set whether to require assertion encryption or skip session key generation.Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
doPreExecute, getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
ecpContextCreationStrategy
Strategy used to locate theECPContextto populate. -
encryptionContextLookupStrategy
Strategy used to locate theEncryptionContext. -
randomGenerator
Random number generator. -
requireEncryption
private boolean requireEncryptionOnly generate a key if encryption is expected.
-
-
Constructor Details
-
PopulateECPContext
Constructor.- Throws:
NoSuchAlgorithmException- if unable to construct default random generator
-
-
Method Details
-
setECPContextCreationStrategy
public void setECPContextCreationStrategy(@Nonnull Function<ProfileRequestContext, ECPContext> strategy) Set the strategy used to locate theECPContextto operate on.- Parameters:
strategy- lookup strategy
-
setEncryptionContextLookupStrategy
public void setEncryptionContextLookupStrategy(@Nonnull Function<ProfileRequestContext, EncryptionContext> strategy) Set the strategy used to locate theEncryptionContext.- Parameters:
strategy- lookup strategy
-
setRandomGenerator
Set the source of randomness to use, or none to bypass key generation.- Parameters:
generator- random number generator
-
setRequireEncryption
public void setRequireEncryption(boolean flag) Set whether to require assertion encryption or skip session key generation.- Parameters:
flag- flag to set
-
doExecute
Performs this action. Actions must override this method to perform their work.- Overrides:
doExecutein classAbstractProfileAction- Parameters:
profileRequestContext- the current IdP profile request context
-