org.opensaml.saml2.binding.decoding
Class HTTPArtifactDecoder

java.lang.Object
  extended by org.opensaml.common.binding.decoding.impl.AbstractMessageDecoder<javax.servlet.http.HttpServletRequest>
      extended by org.opensaml.common.binding.decoding.impl.AbstractHTTPMessageDecoder
          extended by org.opensaml.saml2.binding.decoding.HTTPArtifactDecoder
All Implemented Interfaces:
HTTPMessageDecoder, MessageDecoder<javax.servlet.http.HttpServletRequest>

public class HTTPArtifactDecoder
extends AbstractHTTPMessageDecoder

SAML 2 Artifact Binding decoder, support both HTTP GET and POST.


Constructor Summary
HTTPArtifactDecoder()
           
 
Method Summary
 void decode()
          Decodes a SAML message in a binding specific manner.
protected  SAMLArtifact decodeArtifact()
          Extracts the Base64 encoded from the request, decodes it, and builds a SAMLArtifact from it.
 SAMLArtifact getArtifact()
          Gets the artifact created for the given SAML message.
 SAMLArtifactFactory getArtifactFactory()
          Gets the artifact factory used to create artifacts for this encoder.
 java.lang.String getBindingURI()
          Gets the binding URI supported by this encoder.
 void setArtifactFactory(SAMLArtifactFactory factory)
          Sets the artifact factory used to create artifacts for this encoder.
 
Methods inherited from class org.opensaml.common.binding.decoding.impl.AbstractHTTPMessageDecoder
getMethod, getRelayState, setHttpMethod, setRelayState
 
Methods inherited from class org.opensaml.common.binding.decoding.impl.AbstractMessageDecoder
evaluateSecurityPolicy, getMetadataProvider, getParserPool, getRequest, getSAMLMessage, getSecurityPolicy, getTrustEngine, setMetadataProvider, setParserPool, setRequest, setSAMLMessage, setSecurityPolicy, setTrustEngine, unmarshallMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensaml.common.binding.decoding.MessageDecoder
getMetadataProvider, getRequest, getSAMLMessage, getSecurityPolicy, getTrustEngine, setMetadataProvider, setRequest, setSecurityPolicy, setTrustEngine
 

Constructor Detail

HTTPArtifactDecoder

public HTTPArtifactDecoder()
Method Detail

getBindingURI

public java.lang.String getBindingURI()
Gets the binding URI supported by this encoder.

Returns:
binding URI supported by this encoder

getArtifactFactory

public SAMLArtifactFactory getArtifactFactory()
Gets the artifact factory used to create artifacts for this encoder.

Returns:
artifact factory used to create artifacts for this encoder

setArtifactFactory

public void setArtifactFactory(SAMLArtifactFactory factory)
Sets the artifact factory used to create artifacts for this encoder.

Parameters:
factory - artifact factory used to create artifacts for this encoder

getArtifact

public SAMLArtifact getArtifact()
Gets the artifact created for the given SAML message.

Returns:
artifact created for the given SAML message

decode

public void decode()
            throws BindingException
Decodes a SAML message in a binding specific manner.

Throws:
BindingException - thrown if the message can not be decoded

decodeArtifact

protected SAMLArtifact decodeArtifact()
                               throws BindingException
Extracts the Base64 encoded from the request, decodes it, and builds a SAMLArtifact from it.

Returns:
the SAML artifact
Throws:
BindingException - thrown if the SAML artifact could not be created