Class HTTPPostEncoder
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.messaging.encoder.AbstractMessageEncoder
-
- org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder
-
- org.opensaml.messaging.encoder.servlet.BaseHttpServletResponseXMLMessageEncoder
-
- org.opensaml.saml.saml1.binding.encoding.impl.BaseSAML1MessageEncoder
-
- org.opensaml.saml.saml1.binding.encoding.impl.HTTPPostEncoder
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,UnmodifiableComponent,MessageEncoder,HttpServletResponseMessageEncoder,SAMLMessageEncoder
public class HTTPPostEncoder extends BaseSAML1MessageEncoder
SAML 1.X HTTP POST message encoder.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_TEMPLATE_IDDefault template ID.private org.slf4j.LoggerlogClass logger.private org.apache.velocity.app.VelocityEnginevelocityEngineVelocity engine used to evaluate the template when performing POST encoding.private StringvelocityTemplateIdID of the velocity template used when performing POST encoding.
-
Constructor Summary
Constructors Constructor Description HTTPPostEncoder()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoDestroy()protected voiddoEncode()protected voiddoInitialize()StringgetBindingURI()org.apache.velocity.app.VelocityEnginegetVelocityEngine()Get the VelocityEngine instance.StringgetVelocityTemplateId()Get the Velocity template id.protected voidpostEncode(MessageContext messageContext, String endpointURL)Base64 and POST encodes the outbound message and writes it to the outbound transport.voidsetVelocityEngine(org.apache.velocity.app.VelocityEngine newVelocityEngine)Set the VelocityEngine instance.voidsetVelocityTemplateId(String newVelocityTemplateId)Set the Velocity template id.-
Methods inherited from class org.opensaml.saml.saml1.binding.encoding.impl.BaseSAML1MessageEncoder
getEndpointURL
-
Methods inherited from class org.opensaml.messaging.encoder.servlet.BaseHttpServletResponseXMLMessageEncoder
encode, getMessageToLog, logEncodedMessage, marshallMessage
-
Methods inherited from class org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder
getHttpServletResponse, getHttpServletResponseSupplier, setHttpServletResponse, setHttpServletResponseSupplier
-
Methods inherited from class org.opensaml.messaging.encoder.AbstractMessageEncoder
getMessageContext, prepareContext, setMessageContext
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Methods inherited from interface org.opensaml.messaging.encoder.MessageEncoder
encode, prepareContext, setMessageContext
-
-
-
-
Field Detail
-
DEFAULT_TEMPLATE_ID
public static final String DEFAULT_TEMPLATE_ID
Default template ID.- See Also:
- Constant Field Values
-
log
private final org.slf4j.Logger log
Class logger.
-
velocityEngine
private org.apache.velocity.app.VelocityEngine velocityEngine
Velocity engine used to evaluate the template when performing POST encoding.
-
velocityTemplateId
private String velocityTemplateId
ID of the velocity template used when performing POST encoding.
-
-
Method Detail
-
getBindingURI
public String getBindingURI()
-
getVelocityEngine
public org.apache.velocity.app.VelocityEngine getVelocityEngine()
Get the VelocityEngine instance.- Returns:
- return the VelocityEngine instance
-
setVelocityEngine
public void setVelocityEngine(org.apache.velocity.app.VelocityEngine newVelocityEngine)
Set the VelocityEngine instance.- Parameters:
newVelocityEngine- the new VelocityEngine instane
-
getVelocityTemplateId
public String getVelocityTemplateId()
Get the Velocity template id.Defaults to
DEFAULT_TEMPLATE_ID.- Returns:
- return the Velocity template id
-
setVelocityTemplateId
public void setVelocityTemplateId(String newVelocityTemplateId)
Set the Velocity template id.Defaults to
DEFAULT_TEMPLATE_ID.- Parameters:
newVelocityTemplateId- the new Velocity template id
-
doDestroy
protected void doDestroy()
- Overrides:
doDestroyin classAbstractMessageEncoder
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractHttpServletResponseMessageEncoder- Throws:
ComponentInitializationException
-
doEncode
protected void doEncode() throws MessageEncodingException- Specified by:
doEncodein classAbstractMessageEncoder- Throws:
MessageEncodingException
-
postEncode
protected void postEncode(MessageContext messageContext, String endpointURL) throws MessageEncodingException
Base64 and POST encodes the outbound message and writes it to the outbound transport.- Parameters:
messageContext- current message contextendpointURL- endpoint URL to encode message to- Throws:
MessageEncodingException- thrown if there is a problem encoding the message
-
-