org.opensaml.saml2.binding.encoding
public class HTTPArtifactEncoder extends BaseSAML2MessageEncoder
Modifier and Type | Field and Description |
---|---|
private SAMLArtifactMap |
artifactMap
SAML artifact map used to store created artifacts for later retrieval.
|
private byte[] |
defaultArtifactType
Default artifact type to use when encoding messages.
|
private org.slf4j.Logger |
log
Class logger.
|
private boolean |
postEncoding
Whether the POST encoding should be used, instead of GET.
|
private org.apache.velocity.app.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 |
---|
HTTPArtifactEncoder(org.apache.velocity.app.VelocityEngine engine,
String template,
SAMLArtifactMap map)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected AbstractSAML2Artifact |
buildArtifact(SAMLMessageContext artifactContext)
Builds the SAML 2 artifact for the outgoing message.
|
protected void |
doEncode(MessageContext messageContext) |
String |
getBindingURI()
Gets the SAML binding URI supported by this encoder.
|
protected void |
getEncode(SAMLMessageContext artifactContext,
HTTPOutTransport outTransport)
Performs HTTP GET based encoding.
|
boolean |
isPostEncoding()
Gets whether the encoder will encode the artifact via POST encoding.
|
protected void |
postEncode(SAMLMessageContext artifactContext,
HTTPOutTransport outTransport)
Performs HTTP POST based encoding.
|
boolean |
providesMessageConfidentiality(MessageContext messageContext) |
boolean |
providesMessageIntegrity(MessageContext messageContext) |
void |
setPostEncoding(boolean post)
Sets whether the encoder will encode the artifact via POST encoding.
|
checkRelayState, getAllowedURLSchemes, getEndpointURL, setAllowedURLSchemes, setResponseDestination, signMessage
encode, logEncodedMessage, marshallMessage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
encode
private final org.slf4j.Logger log
private boolean postEncoding
private org.apache.velocity.app.VelocityEngine velocityEngine
private String velocityTemplateId
private SAMLArtifactMap artifactMap
private byte[] defaultArtifactType
public HTTPArtifactEncoder(org.apache.velocity.app.VelocityEngine engine, String template, SAMLArtifactMap map)
engine
- velocity engine used to construct the POST formtemplate
- ID of velocity template used to construct the POST formmap
- artifact map used to store artifact/message bindingspublic String getBindingURI()
public boolean isPostEncoding()
public void setPostEncoding(boolean post)
post
- true if POST encoding will be used, false if GET encoding will be usedpublic boolean providesMessageConfidentiality(MessageContext messageContext) throws MessageEncodingException
MessageEncodingException
public boolean providesMessageIntegrity(MessageContext messageContext) throws MessageEncodingException
MessageEncodingException
protected void doEncode(MessageContext messageContext) throws MessageEncodingException
doEncode
in class BaseMessageEncoder
MessageEncodingException
protected void postEncode(SAMLMessageContext artifactContext, HTTPOutTransport outTransport) throws MessageEncodingException
artifactContext
- current request contextoutTransport
- outbound HTTP transportMessageEncodingException
- thrown if there is a problem POST encoding the artifactprotected void getEncode(SAMLMessageContext artifactContext, HTTPOutTransport outTransport) throws MessageEncodingException
artifactContext
- current request contextoutTransport
- outbound HTTP transportMessageEncodingException
- thrown if there is a problem GET encoding the artifactprotected AbstractSAML2Artifact buildArtifact(SAMLMessageContext artifactContext) throws MessageEncodingException
artifactContext
- current request contextMessageEncodingException
- thrown if the artifact can not be createdCopyright © 1999-2013 JBoss by Red Hat. All Rights Reserved.