public class HTTPPostEncoder extends BaseSAML2MessageEncoder
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TEMPLATE_ID
Default template ID.
|
Constructor and Description |
---|
HTTPPostEncoder()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doDestroy()
Performs component specific destruction logic.
|
protected void |
doEncode() |
protected void |
doInitialize()
Performs the initialization of the component.
|
String |
getBindingURI()
Gets the SAML binding URI supported by this encoder.
|
org.apache.velocity.app.VelocityEngine |
getVelocityEngine()
Get the VelocityEngine instance.
|
String |
getVelocityTemplateId()
Get the Velocity template id.
|
protected void |
populateVelocityContext(org.apache.velocity.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(org.apache.velocity.app.VelocityEngine newVelocityEngine)
Set the VelocityEngine instance.
|
void |
setVelocityTemplateId(String newVelocityTemplateId)
Set the Velocity template id.
|
getEndpointURL
encode, getMessageToLog, logEncodedMessage, marshallMessage
getHttpServletResponse, setHttpServletResponse
getMessageContext, prepareContext, setMessageContext
destroy, initialize, isDestroyed, isInitialized
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
encode, prepareContext, setMessageContext
initialize, isInitialized
destroy, isDestroyed
public static final String DEFAULT_TEMPLATE_ID
public String getBindingURI()
public org.apache.velocity.app.VelocityEngine getVelocityEngine()
public void setVelocityEngine(org.apache.velocity.app.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 ComponentInitializationException
doInitialize
in class org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder<SAMLObject>
ComponentInitializationException
- thrown if there is a problem initializing the componentprotected void doEncode() throws org.opensaml.messaging.encoder.MessageEncodingException
doEncode
in class org.opensaml.messaging.encoder.AbstractMessageEncoder<SAMLObject>
org.opensaml.messaging.encoder.MessageEncodingException
protected 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(org.apache.velocity.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 © 2016 JBoss by Red Hat. All rights reserved.