public class PopulateECPContext extends AbstractConditionalProfileAction
ECPContext
based on the request and, when encryption is in use,
generating a session key.Modifier and Type | Field and Description |
---|---|
private com.google.common.base.Function<ProfileRequestContext,ECPContext> |
ecpContextCreationStrategy
Strategy used to locate the
ECPContext to populate. |
private com.google.common.base.Function<ProfileRequestContext,EncryptionContext> |
encryptionContextLookupStrategy
Strategy used to locate the
EncryptionContext . |
private org.slf4j.Logger |
log
Class logger.
|
private SecureRandom |
randomGenerator
Random number generator.
|
private boolean |
requireEncryption
Only generate a key if encryption is expected.
|
Constructor and Description |
---|
PopulateECPContext()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doExecute(ProfileRequestContext profileRequestContext) |
void |
setECPContextCreationStrategy(com.google.common.base.Function<ProfileRequestContext,ECPContext> strategy)
Set the strategy used to locate the
ECPContext to operate on. |
void |
setEncryptionContextLookupStrategy(com.google.common.base.Function<ProfileRequestContext,EncryptionContext> strategy)
Set the strategy used to locate the
EncryptionContext . |
void |
setRandomGenerator(SecureRandom generator)
Set the source of randomness to use, or none to bypass key generation.
|
void |
setRequireEncryption(boolean flag)
Set whether to require assertion encryption or skip session key generation.
|
doPreExecute, getActivationCondition, setActivationCondition
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
@Nonnull private final org.slf4j.Logger log
@Nonnull private com.google.common.base.Function<ProfileRequestContext,ECPContext> ecpContextCreationStrategy
ECPContext
to populate.@Nonnull private com.google.common.base.Function<ProfileRequestContext,EncryptionContext> encryptionContextLookupStrategy
EncryptionContext
.@Nullable private SecureRandom randomGenerator
private boolean requireEncryption
public PopulateECPContext() throws NoSuchAlgorithmException
NoSuchAlgorithmException
- if unable to construct default random generatorpublic void setECPContextCreationStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,ECPContext> strategy)
ECPContext
to operate on.strategy
- lookup strategypublic void setEncryptionContextLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,EncryptionContext> strategy)
EncryptionContext
.strategy
- lookup strategypublic void setRandomGenerator(@Nullable SecureRandom generator)
generator
- random number generatorpublic void setRequireEncryption(boolean flag)
flag
- flag to setprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
doExecute
in class AbstractProfileAction
Copyright © 1999–2020 Shibboleth Consortium. All rights reserved.