public class HTTPArtifactEncoder extends BaseSAML2MessageEncoder
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TEMPLATE_ID
Default template ID.
|
Constructor and Description |
---|
HTTPArtifactEncoder()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected AbstractSAML2Artifact |
buildArtifact(org.opensaml.messaging.context.MessageContext<SAMLObject> messageContext)
Builds the SAML 2 artifact for the outgoing message.
|
protected void |
doDestroy()
Performs component specific destruction logic.
|
protected void |
doEncode() |
protected void |
doInitialize()
Performs the initialization of the component.
|
SAMLArtifactMap |
getArtifactMap()
Get the SAML artifact map to use.
|
String |
getBindingURI()
Gets the SAML binding URI supported by this encoder.
|
protected void |
getEncode()
Performs HTTP GET based encoding.
|
org.apache.velocity.app.VelocityEngine |
getVelocityEngine()
Get the VelocityEngine instance.
|
String |
getVelocityTemplateId()
Get the Velocity template id.
|
boolean |
isPostEncoding()
Get whether the encoder will encode the artifact via POST encoding.
|
protected void |
postEncode()
Performs HTTP POST based encoding.
|
void |
setArtifactMap(SAMLArtifactMap newArtifactMap)
Set the SAML artifact map to use.
|
void |
setPostEncoding(boolean post)
Set whether the encoder will encode the artifact via POST encoding.
|
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
@Nonnull @NotEmpty public static final String DEFAULT_TEMPLATE_ID
public String getBindingURI()
public boolean isPostEncoding()
public void setPostEncoding(boolean post)
post
- true if POST encoding will be used, false if GET encoding will be used@Nullable public org.apache.velocity.app.VelocityEngine getVelocityEngine()
public void setVelocityEngine(@Nullable org.apache.velocity.app.VelocityEngine newVelocityEngine)
newVelocityEngine
- the new VelocityEngine instane@Nonnull @NotEmpty public String getVelocityTemplateId()
Defaults to DEFAULT_TEMPLATE_ID
.
public void setVelocityTemplateId(@Nonnull @NotEmpty String newVelocityTemplateId)
Defaults to DEFAULT_TEMPLATE_ID
.
newVelocityTemplateId
- the new Velocity template id@NonnullAfterInit public SAMLArtifactMap getArtifactMap()
public void setArtifactMap(@Nonnull SAMLArtifactMap newArtifactMap)
newArtifactMap
- the new artifactMapprotected 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 doDestroy()
doDestroy
in class org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder<SAMLObject>
protected 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() throws org.opensaml.messaging.encoder.MessageEncodingException
org.opensaml.messaging.encoder.MessageEncodingException
- thrown if there is a problem POST encoding the artifactprotected void getEncode() throws org.opensaml.messaging.encoder.MessageEncodingException
org.opensaml.messaging.encoder.MessageEncodingException
- thrown if there is a problem GET encoding the artifact@Nonnull protected AbstractSAML2Artifact buildArtifact(@Nonnull org.opensaml.messaging.context.MessageContext<SAMLObject> messageContext) throws org.opensaml.messaging.encoder.MessageEncodingException
messageContext
- current request contextorg.opensaml.messaging.encoder.MessageEncodingException
- thrown if the artifact can not be createdCopyright © 2016 JBoss by Red Hat. All rights reserved.