public class HTTPPostEncoder extends BaseSAML2MessageEncoder
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_TEMPLATE_ID
Default template ID.
|
private Logger |
log
Class logger.
|
private VelocityEngine |
velocityEngine
Velocity engine used to evaluate the template when performing POST encoding.
|
private String |
velocityTemplateId
ID of the Velocity template used when performing POST encoding.
|
| Constructor and Description |
|---|
HTTPPostEncoder()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDestroy() |
protected void |
doEncode() |
protected void |
doInitialize() |
String |
getBindingURI() |
VelocityEngine |
getVelocityEngine()
Get the VelocityEngine instance.
|
String |
getVelocityTemplateId()
Get the Velocity template id.
|
protected void |
populateVelocityContext(VelocityContext velocityContext,
org.opensaml.messaging.context.MessageContext<SAMLObject> messageContext,
String endpointURL)
Populate the Velocity context instance which will be used to render the POST body.
|
protected void |
postEncode(org.opensaml.messaging.context.MessageContext<SAMLObject> messageContext,
String endpointURL)
Base64 and POST encodes the outbound message and writes it to the outbound transport.
|
void |
setVelocityEngine(VelocityEngine newVelocityEngine)
Set the VelocityEngine instance.
|
void |
setVelocityTemplateId(String newVelocityTemplateId)
Set the Velocity template id.
|
getEndpointURLencode, getMessageToLog, logEncodedMessage, marshallMessagegetHttpServletResponse, setHttpServletResponsegetMessageContext, prepareContext, setMessageContextdestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencode, prepareContext, setMessageContextpublic static final String DEFAULT_TEMPLATE_ID
private final Logger log
private VelocityEngine velocityEngine
private String velocityTemplateId
public String getBindingURI()
public VelocityEngine getVelocityEngine()
public void setVelocityEngine(VelocityEngine newVelocityEngine)
newVelocityEngine - the new VelocityEngine instanepublic String getVelocityTemplateId()
Defaults to DEFAULT_TEMPLATE_ID.
public void setVelocityTemplateId(String newVelocityTemplateId)
Defaults to DEFAULT_TEMPLATE_ID.
newVelocityTemplateId - the new Velocity template idprotected void doDestroy()
doDestroy in class org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder<SAMLObject>protected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder<SAMLObject>net.shibboleth.utilities.java.support.component.ComponentInitializationExceptionprotected void doEncode()
throws org.opensaml.messaging.encoder.MessageEncodingException
doEncode in class org.opensaml.messaging.encoder.AbstractMessageEncoder<SAMLObject>org.opensaml.messaging.encoder.MessageEncodingExceptionprotected void postEncode(org.opensaml.messaging.context.MessageContext<SAMLObject> messageContext, String endpointURL) throws org.opensaml.messaging.encoder.MessageEncodingException
messageContext - current message contextendpointURL - endpoint URL to which to encode messageorg.opensaml.messaging.encoder.MessageEncodingException - thrown if there is a problem encoding the messageprotected void populateVelocityContext(VelocityContext velocityContext, org.opensaml.messaging.context.MessageContext<SAMLObject> messageContext, String endpointURL) throws org.opensaml.messaging.encoder.MessageEncodingException
velocityContext - the Velocity context instance to populate with datamessageContext - the SAML message context source of dataendpointURL - endpoint URL to which to encode messageorg.opensaml.messaging.encoder.MessageEncodingException - thrown if there is a problem encoding the messageCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.