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(MessageContext<SAMLObject> messageContext)
Builds the SAML 2 artifact for the outgoing message.
|
protected void |
doDestroy() |
protected void |
doEncode()
Performs the encoding logic.
|
protected void |
doInitialize() |
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.
|
getEndpointURLencode, getMessageToLog, logEncodedMessage, marshallMessagegetHttpServletResponse, setHttpServletResponsegetMessageContext, prepareContext, setMessageContextdestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencode, prepareContext, setMessageContext@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 net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class AbstractHttpServletResponseMessageEncoder<SAMLObject>net.shibboleth.utilities.java.support.component.ComponentInitializationExceptionprotected void doDestroy()
doDestroy in class AbstractHttpServletResponseMessageEncoder<SAMLObject>protected void doEncode()
throws MessageEncodingException
doEncode in class AbstractMessageEncoder<SAMLObject>MessageEncodingException - thrown if there is a problem encoding the messageprotected void postEncode()
throws MessageEncodingException
MessageEncodingException - thrown if there is a problem POST encoding the artifactprotected void getEncode()
throws MessageEncodingException
MessageEncodingException - thrown if there is a problem GET encoding the artifact@Nonnull protected AbstractSAML2Artifact buildArtifact(@Nonnull MessageContext<SAMLObject> messageContext) throws MessageEncodingException
messageContext - current request contextMessageEncodingException - thrown if the artifact can not be createdCopyright © 2021. All rights reserved.