public class SAMLProtocolAndRoleHandler
extends org.opensaml.messaging.handler.AbstractMessageHandler
MessageHandler that attaches protocol
and role information to a message context via SAMLProtocolContext and
an instance of AbstractSAMLEntityContext objects. The entity context class
is configurable and defaults to SAMLPeerEntityContext.
A profile flow would typically run this handler after message decoding occurs, to bootstrap subsequent handlers.
| Modifier and Type | Field and Description |
|---|---|
private org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.opensaml.messaging.context.BaseContext> |
copyContextLookup
Optional lookup function for a context from which to copy the protocol and role data,
for example from a parent operation context.
|
private Class<? extends AbstractSAMLEntityContext> |
entityContextClass
The context class representing the SAML entity for whom data is to be attached.
|
private QName |
peerRole
Role type to add to context.
|
private String |
samlProtocol
Protocol value to add to context.
|
| Constructor and Description |
|---|
SAMLProtocolAndRoleHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialize() |
protected void |
doInvoke(org.opensaml.messaging.context.MessageContext messageContext) |
void |
setCopyContextLookup(org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.opensaml.messaging.context.BaseContext> lookup)
Set the optional lookup function for a context from which to copy the protocol and role data,
for example from a parent operation context.
|
void |
setEntityContextClass(Class<? extends AbstractSAMLEntityContext> clazz)
Set the class type holding the SAML entity data.
|
void |
setProtocol(String protocol)
Set the protocol constant to attach.
|
void |
setRole(QName role)
Set the operational role to attach.
|
doPostInvoke, doPostInvoke, doPreInvoke, getActivationCondition, getLogPrefix, invoke, setActivationConditiondestroy, doDestroy, initialize, isDestroyed, isInitialized@NonnullAfterInit @NotEmpty private String samlProtocol
@NonnullAfterInit private QName peerRole
@Nonnull private Class<? extends AbstractSAMLEntityContext> entityContextClass
SAMLPeerEntityContext.@Nullable private org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.opensaml.messaging.context.BaseContext> copyContextLookup
public void setCopyContextLookup(@Nullable org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.opensaml.messaging.context.BaseContext> lookup)
lookup - the lookup function, may be nullpublic void setEntityContextClass(@Nonnull Class<? extends AbstractSAMLEntityContext> clazz)
Defaults to: SAMLPeerEntityContext.
clazz - the entity context class typepublic void setProtocol(@Nonnull@NotEmpty String protocol)
protocol - the protocol constant to setpublic void setRole(@Nonnull QName role)
role - the operational role to setprotected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationExceptionprotected void doInvoke(org.opensaml.messaging.context.MessageContext messageContext)
throws org.opensaml.messaging.handler.MessageHandlerException
doInvoke in class org.opensaml.messaging.handler.AbstractMessageHandlerorg.opensaml.messaging.handler.MessageHandlerExceptionCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.