public abstract class AbstractDecryptAction extends AbstractProfileAction
The actual message to handle is obtained via strategy function, by default the inbound message.
The SecurityParametersContext governing the decryption process is located by a lookup
strategy, by default a child of the inbound message context.
| Modifier and Type | Field and Description |
|---|---|
private Decrypter |
decrypter
The decryption object.
|
private com.google.common.base.Predicate<net.shibboleth.utilities.java.support.collection.Pair<ProfileRequestContext,EncryptedElementType>> |
decryptionPredicate
Predicate determining whether to attempt decryption.
|
private boolean |
errorFatal
Are decryption failures a fatal condition?
|
private org.slf4j.Logger |
log
Class logger.
|
private SAMLObject |
message
Message to operate on.
|
private com.google.common.base.Function<ProfileRequestContext,java.lang.Object> |
messageLookupStrategy
Strategy used to locate the SAML message to operate on.
|
private com.google.common.base.Function<ProfileRequestContext,SecurityParametersContext> |
securityParamsLookupStrategy
Strategy used to locate the
SecurityParametersContext. |
| Constructor and Description |
|---|
AbstractDecryptAction()
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.
|
Decrypter |
getDecrypter()
Get the decrypter.
|
com.google.common.base.Predicate<net.shibboleth.utilities.java.support.collection.Pair<ProfileRequestContext,EncryptedElementType>> |
getDecryptionPredicate()
Get the predicate used to determine whether to attempt decryption.
|
SAMLObject |
getSAMLObject()
Get the object to act on.
|
boolean |
isErrorFatal()
Get whether decryption failure should be treated as an error or ignored.
|
void |
setDecryptionPredicate(com.google.common.base.Predicate<net.shibboleth.utilities.java.support.collection.Pair<ProfileRequestContext,EncryptedElementType>> predicate)
Set the predicate used to determine whether to attempt decryption.
|
void |
setErrorFatal(boolean flag)
Set whether decryption failure should be treated as an error or ignored.
|
void |
setMessageLookupStrategy(com.google.common.base.Function<ProfileRequestContext,java.lang.Object> strategy)
Set the strategy used to locate the
SAMLObject to operate on. |
void |
setSecurityParametersContextLookupStrategy(com.google.common.base.Function<ProfileRequestContext,SecurityParametersContext> strategy)
Set the strategy used to locate the
SecurityParametersContext associated with a given
ProfileRequestContext. |
doExecute, doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized@Nonnull private final org.slf4j.Logger log
private boolean errorFatal
@Nonnull private com.google.common.base.Function<ProfileRequestContext,SecurityParametersContext> securityParamsLookupStrategy
SecurityParametersContext.@Nonnull private com.google.common.base.Function<ProfileRequestContext,java.lang.Object> messageLookupStrategy
@Nonnull private com.google.common.base.Predicate<net.shibboleth.utilities.java.support.collection.Pair<ProfileRequestContext,EncryptedElementType>> decryptionPredicate
@Nullable private Decrypter decrypter
@Nullable private SAMLObject message
public boolean isErrorFatal()
public void setErrorFatal(boolean flag)
flag - true iff decryption failure should be fatalpublic void setSecurityParametersContextLookupStrategy(@Nonnull
com.google.common.base.Function<ProfileRequestContext,SecurityParametersContext> strategy)
SecurityParametersContext associated with a given
ProfileRequestContext.strategy - strategy used to locate the SecurityParametersContext associated with a given
ProfileRequestContextpublic void setMessageLookupStrategy(@Nonnull
com.google.common.base.Function<ProfileRequestContext,java.lang.Object> strategy)
SAMLObject to operate on.strategy - strategy used to locate the SAMLObject to operate on@Nonnull public com.google.common.base.Predicate<net.shibboleth.utilities.java.support.collection.Pair<ProfileRequestContext,EncryptedElementType>> getDecryptionPredicate()
public void setDecryptionPredicate(@Nonnull
com.google.common.base.Predicate<net.shibboleth.utilities.java.support.collection.Pair<ProfileRequestContext,EncryptedElementType>> predicate)
predicate - predicate to use@Nullable public Decrypter getDecrypter()
@Nullable public SAMLObject getSAMLObject()
protected 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 AbstractProfileActionprofileRequestContext - the current IdP profile request context