|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensaml.ws.message.decoder.BaseMessageDecoder
org.opensaml.common.binding.decoding.BaseSAMLMessageDecoder
public abstract class BaseSAMLMessageDecoder
Base class for all SAML message decoders.
Constructor Summary | |
---|---|
BaseSAMLMessageDecoder()
Constructor. |
|
BaseSAMLMessageDecoder(org.opensaml.xml.parse.ParserPool pool)
Constructor. |
Method Summary | |
---|---|
protected void |
checkEndpointURI(SAMLMessageContext messageContext)
Check the validity of the SAML protocol message receiver endpoint against requirements indicated in the message. |
protected boolean |
compareEndpointURIs(String messageDestination,
String receiverEndpoint)
Compare the message endpoint URI's specified. |
protected String |
getActualReceiverEndpointURI(SAMLMessageContext messageContext)
Extract the transport endpoint at which this message was received. |
protected abstract String |
getIntendedDestinationEndpointURI(SAMLMessageContext samlMsgCtx)
Extract the message information which indicates to what receiver endpoint URI the SAML message was intended to be delivered. |
URIComparator |
getURIComparator()
Get the URIComparator to use in compareEndpointURIs(String, String) . |
protected abstract 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. |
void |
setURIComparator(URIComparator comparator)
Set the URIComparator to use in compareEndpointURIs(String, String) . |
Methods inherited from class org.opensaml.ws.message.decoder.BaseMessageDecoder |
---|
decode, doDecode, getParserPool, logDecodedMessage, processSecurityPolicy, setParserPool, 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.SAMLMessageDecoder |
---|
getBindingURI |
Methods inherited from interface org.opensaml.ws.message.decoder.MessageDecoder |
---|
decode |
Constructor Detail |
---|
public BaseSAMLMessageDecoder()
public BaseSAMLMessageDecoder(org.opensaml.xml.parse.ParserPool pool)
pool
- parser pool used to deserialize messagesMethod Detail |
---|
public void setURIComparator(URIComparator comparator)
URIComparator
to use in compareEndpointURIs(String, String)
.
comparator
- The uriComparator to set.public URIComparator getURIComparator()
URIComparator
to use in compareEndpointURIs(String, String)
.
protected boolean isMessageSigned(SAMLMessageContext messageContext)
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.
messageContext
- current message context
protected abstract boolean isIntendedDestinationEndpointURIRequired(SAMLMessageContext samlMsgCtx)
samlMsgCtx
- current SAML message context
protected abstract String getIntendedDestinationEndpointURI(SAMLMessageContext samlMsgCtx) throws org.opensaml.ws.message.decoder.MessageDecodingException
samlMsgCtx
- the SAML message context being processed
org.opensaml.ws.message.decoder.MessageDecodingException
- thrown if the message is not an instance of SAML message that
could be processed by the decoderprotected String getActualReceiverEndpointURI(SAMLMessageContext messageContext) throws org.opensaml.ws.message.decoder.MessageDecodingException
This default implementation assumes an underlying message context InTransport
type
of HttpServletRequestAdapter
and returns the string representation of the underlying
request URL as constructed via HttpServletRequest.getRequestURL()
.
Subclasses should override if binding-specific behavior or support for other transport
typs is required. In this case, see also compareEndpointURIs(String, String)
.
messageContext
- current message context
org.opensaml.ws.message.decoder.MessageDecodingException
- thrown if the endpoint can not be extracted from the message
context and converted to a string representationprotected boolean compareEndpointURIs(String messageDestination, String receiverEndpoint) throws org.opensaml.ws.message.decoder.MessageDecodingException
The comparison is performed using the configured instance of URIComparator
.
By default, the URL subtype of URI is supported, and the default comparator implementation used
is BasicURLComparator
. Other types of URI's may be supported by configuring a
different implementation of URIComparator
.
Subclasses should override if binding-specific behavior is required.
In this case, see also getActualReceiverEndpointURI(SAMLMessageContext)
.
messageDestination
- the intended message destination endpoint URIreceiverEndpoint
- the endpoint URI at which the message was received
org.opensaml.ws.message.decoder.MessageDecodingException
- thrown if the endpoints specified are not equivalentprotected void checkEndpointURI(SAMLMessageContext messageContext) throws org.opensaml.xml.security.SecurityException, org.opensaml.ws.message.decoder.MessageDecodingException
messageContext
- current message context
org.opensaml.xml.security.SecurityException
- thrown if the message Destination attribute is invalid
with respect to the receiver's endpoint
org.opensaml.ws.message.decoder.MessageDecodingException
- thrown if there is a problem decoding and processing
the message Destination or receiver
endpoint information
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |