org.opensaml.saml2.binding.decoding
Class HTTPPostDecoder

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.HTTPPostDecoder
All Implemented Interfaces:
HTTPMessageDecoder, MessageDecoder<javax.servlet.http.HttpServletRequest>

public class HTTPPostDecoder
extends AbstractHTTPMessageDecoder

Message decoder implementing the SAML 2.0 HTTP POST profile.


Field Summary
static java.lang.String BINDING_URI
          URI for this binding.
static java.lang.String RELAY_STATE_PARAM
          HTTP request param name for relay state.
static java.lang.String REQUEST_PARAM
          HTTP request param name for SAML request.
static java.lang.String RESPONSE_PARAM
          HTTP request param name for SAML response.
 
Constructor Summary
HTTPPostDecoder()
           
 
Method Summary
 void decode()
          Decodes a SAML message in a binding specific manner.
protected  java.io.InputStream getBase64DecodedMessage()
          Gets the Base64 encoded message from the request and decodes it.
 java.lang.String getBindingURI()
          Gets the binding URI supported by 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
 

Field Detail

BINDING_URI

public static final java.lang.String BINDING_URI
URI for this binding.

See Also:
Constant Field Values

REQUEST_PARAM

public static final java.lang.String REQUEST_PARAM
HTTP request param name for SAML request.

See Also:
Constant Field Values

RESPONSE_PARAM

public static final java.lang.String RESPONSE_PARAM
HTTP request param name for SAML response.

See Also:
Constant Field Values

RELAY_STATE_PARAM

public static final java.lang.String RELAY_STATE_PARAM
HTTP request param name for relay state.

See Also:
Constant Field Values
Constructor Detail

HTTPPostDecoder

public HTTPPostDecoder()
Method Detail

getBindingURI

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

Returns:
binding URI supported by this encoder

decode

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

Throws:
BindingException - thrown if the message can not be decoded
SecurityPolicyException - thrown if the decoded message does not meet the required security policy

getBase64DecodedMessage

protected java.io.InputStream getBase64DecodedMessage()
                                               throws BindingException
Gets the Base64 encoded message from the request and decodes it.

Returns:
decoded message
Throws:
BindingException - thrown if the message does not contain a base64 encoded SAML message