public class SAMLAddAttributeConsumingServiceHandler extends AbstractMessageHandler
MessageHandler that attaches an AttributeConsumingServiceContext
to the SAMLMetadataContext based on the content of an AuthnRequest in the message context.| Modifier and Type | Class and Description |
|---|---|
private class |
SAMLAddAttributeConsumingServiceHandler.AuthnRequestIndexLookup
Default lookup function that reads from a SAML 2
AuthnRequest. |
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Integer |
index
AttributeConsumingService index. |
private com.google.common.base.Function<MessageContext,java.lang.Integer> |
indexLookupStrategy
Lookup strategy for an
AttributeConsumingService index. |
private org.slf4j.Logger |
log
Logger.
|
private com.google.common.base.Function<MessageContext,SAMLMetadataContext> |
metadataContextLookupStrategy
Lookup strategy for
SAMLMetadataContext. |
| Constructor and Description |
|---|
SAMLAddAttributeConsumingServiceHandler()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInvoke(MessageContext messageContext)
Performs the handler logic.
|
protected boolean |
doPreInvoke(MessageContext messageContext)
Called prior to execution, handlers may override this method to perform pre-processing for a request.
|
void |
setIndexLookupStrategy(com.google.common.base.Function<MessageContext,java.lang.Integer> strategy)
Set the strategy to locate the
AttributeConsumingService index from the MessageContext. |
void |
setMetadataContextLookupStrategy(com.google.common.base.Function<MessageContext,SAMLMetadataContext> strategy)
Set the strategy to locate the
SAMLMetadataContext from the MessageContext. |
doPostInvoke, doPostInvoke, getLogPrefix, invokedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized@Nonnull private final org.slf4j.Logger log
@Nonnull private com.google.common.base.Function<MessageContext,SAMLMetadataContext> metadataContextLookupStrategy
SAMLMetadataContext.@Nullable private com.google.common.base.Function<MessageContext,java.lang.Integer> indexLookupStrategy
AttributeConsumingService index.@Nullable private java.lang.Integer index
AttributeConsumingService index.public SAMLAddAttributeConsumingServiceHandler()
public void setMetadataContextLookupStrategy(@Nonnull
com.google.common.base.Function<MessageContext,SAMLMetadataContext> strategy)
SAMLMetadataContext from the MessageContext.strategy - lookup strategypublic void setIndexLookupStrategy(@Nullable
com.google.common.base.Function<MessageContext,java.lang.Integer> strategy)
AttributeConsumingService index from the MessageContext.strategy - lookup strategyprotected boolean doPreInvoke(@Nonnull
MessageContext messageContext)
throws MessageHandlerException
If false is returned, execution will not proceed.
If returning successfully, the last step should be to return the result of the superclass version of this method.
doPreInvoke in class AbstractMessageHandlermessageContext - the message context on which to invoke the handlerMessageHandlerException - if there is a problem executing the handler pre-routineprotected void doInvoke(@Nonnull
MessageContext messageContext)
throws MessageHandlerException
doInvoke in class AbstractMessageHandlermessageContext - the message context on which to invoke the handlerMessageHandlerException - if there is an error invoking the handler on the message context