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 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 |
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, setActivationCondition
destroy, doDestroy, initialize, isDestroyed, isInitialized
@NonnullAfterInit @NotEmpty private String samlProtocol
@NonnullAfterInit private QName peerRole
@Nonnull private Class<? extends AbstractSAMLEntityContext> entityContextClass
SAMLPeerEntityContext
.public 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.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.ComponentInitializationException
protected void doInvoke(org.opensaml.messaging.context.MessageContext messageContext) throws org.opensaml.messaging.handler.MessageHandlerException
doInvoke
in class org.opensaml.messaging.handler.AbstractMessageHandler
org.opensaml.messaging.handler.MessageHandlerException
Copyright © 1999–2020 Shibboleth Consortium. All rights reserved.