Class PopulateECPContext
- java.lang.Object
-
- net.shibboleth.utilities.java.support.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
public class PopulateECPContext extends AbstractConditionalProfileAction
Action to create and populate anECPContextbased on the request and, when encryption is in use, generating a session key.
-
-
Field Summary
Fields Modifier and Type Field Description private Function<ProfileRequestContext,ECPContext>ecpContextCreationStrategyStrategy used to locate theECPContextto populate.private Function<ProfileRequestContext,EncryptionContext>encryptionContextLookupStrategyStrategy used to locate theEncryptionContext.private org.slf4j.LoggerlogClass logger.private SecureRandomrandomGeneratorRandom number generator.private booleanrequireEncryptionOnly generate a key if encryption is expected.
-
Constructor Summary
Constructors Constructor Description PopulateECPContext()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)voidsetECPContextCreationStrategy(Function<ProfileRequestContext,ECPContext> strategy)Set the strategy used to locate theECPContextto operate on.voidsetEncryptionContextLookupStrategy(Function<ProfileRequestContext,EncryptionContext> strategy)Set 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, setActivationCondition
-
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
ecpContextCreationStrategy
@Nonnull private Function<ProfileRequestContext,ECPContext> ecpContextCreationStrategy
Strategy used to locate theECPContextto populate.
-
encryptionContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,EncryptionContext> encryptionContextLookupStrategy
Strategy used to locate theEncryptionContext.
-
randomGenerator
@Nullable private SecureRandom randomGenerator
Random number generator.
-
requireEncryption
private boolean requireEncryption
Only generate a key if encryption is expected.
-
-
Constructor Detail
-
PopulateECPContext
public PopulateECPContext() throws NoSuchAlgorithmExceptionConstructor.- Throws:
NoSuchAlgorithmException- if unable to construct default random generator
-
-
Method Detail
-
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
public void setRandomGenerator(@Nullable SecureRandom generator)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
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
-