public abstract class AbstractEncryptAction extends AbstractConditionalProfileAction
The EncryptionContext
governing the encryption process is located by a lookup
strategy, by default a child of the outbound message context.
An optional recipient name is also obtained from a lookup strategy.
Constructor and Description |
---|
AbstractEncryptAction()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext)
Called prior to execution, actions may override this method to perform pre-processing for a request.
|
protected abstract EncryptionParameters |
getApplicableParameters(EncryptionContext ctx)
Return the right set of parameters for the operation to be performed, or none if no encryption should occur.
|
Encrypter |
getEncrypter()
Get the encrypter.
|
void |
setEncryptionContextLookupStrategy(com.google.common.base.Function<ProfileRequestContext,EncryptionContext> strategy)
Set the strategy used to locate the
EncryptionContext associated with a given
ProfileRequestContext . |
void |
setKeyPlacementLookupStrategy(com.google.common.base.Function<ProfileRequestContext,Encrypter.KeyPlacement> strategy)
Set the strategy used to determine the encrypted key placement strategy.
|
void |
setRecipientLookupStrategy(com.google.common.base.Function<ProfileRequestContext,String> strategy)
Set the strategy used to locate the encryption recipient.
|
getActivationCondition, setActivationCondition
doExecute, doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
public void setEncryptionContextLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,EncryptionContext> strategy)
EncryptionContext
associated with a given
ProfileRequestContext
.strategy
- lookup strategypublic void setRecipientLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,String> strategy)
strategy
- lookup strategypublic void setKeyPlacementLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,Encrypter.KeyPlacement> strategy)
strategy
- lookup strategyprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)
If false is returned, execution will not proceed, and the action should attach an
EventContext
to the context tree to signal how to continue with overall
workflow processing.
If returning successfully, the last step should be to return the result of the superclass version of this method.
doPreExecute
in class AbstractConditionalProfileAction
profileRequestContext
- the current IdP profile request context@Nullable protected abstract EncryptionParameters getApplicableParameters(@Nullable EncryptionContext ctx)
ctx
- possibly null input context to pull parameters fromCopyright © 2019. All rights reserved.