org.opensaml.saml2.binding.decoding
Class HTTPRedirectDeflateDecoder

java.lang.Object
  extended by org.opensaml.ws.message.decoder.BaseMessageDecoder
      extended by org.opensaml.common.binding.decoding.BaseSAMLMessageDecoder
          extended by org.opensaml.saml2.binding.decoding.BaseSAML2MessageDecoder
              extended by org.opensaml.saml2.binding.decoding.HTTPRedirectDeflateDecoder
All Implemented Interfaces:
SAMLMessageDecoder, org.opensaml.ws.message.decoder.MessageDecoder

public class HTTPRedirectDeflateDecoder
extends BaseSAML2MessageDecoder

SAML 2.0 HTTP Redirect decoder using the DEFLATE encoding method. This decoder only supports DEFLATE compression.


Constructor Summary
HTTPRedirectDeflateDecoder()
          Constructor.
HTTPRedirectDeflateDecoder(org.opensaml.xml.parse.ParserPool pool)
          Constructor.
 
Method Summary
protected  InputStream decodeMessage(String message)
          Base64 decodes the SAML message and then decompresses the message.
protected  void doDecode(org.opensaml.ws.message.MessageContext messageContext)
          
 String getBindingURI()
          Gets the SAML binding URI supported by this decoder.
protected  boolean isIntendedDestinationEndpointURIRequired(SAMLMessageContext samlMsgCtx)
          Determine whether the binding implemented by the decoder requires the presence within the message of information indicating the intended message destination endpoint URI.
protected  boolean isMessageSigned(SAMLMessageContext messageContext)
          Determine whether the SAML message represented by the message context is digitally signed.
 
Methods inherited from class org.opensaml.saml2.binding.decoding.BaseSAML2MessageDecoder
decode, extractEntityId, extractRequestInfo, extractResponseInfo, getIntendedDestinationEndpointURI, populateMessageContext, populateMessageIdIssueInstantIssuer, populateRelyingPartyMetadata
 
Methods inherited from class org.opensaml.common.binding.decoding.BaseSAMLMessageDecoder
checkEndpointURI, compareEndpointURIs, getActualReceiverEndpointURI
 
Methods inherited from class org.opensaml.ws.message.decoder.BaseMessageDecoder
getParserPool, logDecodedMessage, processSecurityPolicy, setParserPool, unmarshallMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPRedirectDeflateDecoder

public HTTPRedirectDeflateDecoder()
Constructor.


HTTPRedirectDeflateDecoder

public HTTPRedirectDeflateDecoder(org.opensaml.xml.parse.ParserPool pool)
Constructor.

Parameters:
pool - parser pool used to deserialize messages
Method Detail

getBindingURI

public String getBindingURI()
Gets the SAML binding URI supported by this decoder.

Returns:
SAML binding URI supported by this decoder

isIntendedDestinationEndpointURIRequired

protected boolean isIntendedDestinationEndpointURIRequired(SAMLMessageContext samlMsgCtx)
Determine whether the binding implemented by the decoder requires the presence within the message of information indicating the intended message destination endpoint URI.

Specified by:
isIntendedDestinationEndpointURIRequired in class BaseSAMLMessageDecoder
Parameters:
samlMsgCtx - current SAML message context
Returns:
true if the intended message destination endpoint is required, false if not

doDecode

protected void doDecode(org.opensaml.ws.message.MessageContext messageContext)
                 throws org.opensaml.ws.message.decoder.MessageDecodingException

Specified by:
doDecode in class org.opensaml.ws.message.decoder.BaseMessageDecoder
Throws:
org.opensaml.ws.message.decoder.MessageDecodingException

isMessageSigned

protected boolean isMessageSigned(SAMLMessageContext messageContext)
Determine whether the SAML message represented by the message context is digitally signed.

The default behavior is to examine whether an XML signature is present on the SAML protocol message. Subclasses may augment or replace with binding-specific behavior.

Overrides:
isMessageSigned in class BaseSAMLMessageDecoder
Parameters:
messageContext - current message context
Returns:
true if the message is considered to be digitially signed, false otherwise

decodeMessage

protected InputStream decodeMessage(String message)
                             throws org.opensaml.ws.message.decoder.MessageDecodingException
Base64 decodes the SAML message and then decompresses the message.

Parameters:
message - Base64 encoded, DEFALTE compressed, SAML message
Returns:
the SAML message
Throws:
org.opensaml.ws.message.decoder.MessageDecodingException - thrown if the message can not be decoded


Copyright © 2006-2010 Internet2. All Rights Reserved.