org.opensaml.saml1.binding.security
Class SAML1ProtocolMessageRuleFactory.SAML1ProtocolMessageRule

java.lang.Object
  extended by org.opensaml.saml1.binding.security.SAML1ProtocolMessageRuleFactory.SAML1ProtocolMessageRule
All Implemented Interfaces:
SecurityPolicyRule<javax.servlet.ServletRequest>
Enclosing class:
SAML1ProtocolMessageRuleFactory

public class SAML1ProtocolMessageRuleFactory.SAML1ProtocolMessageRule
extends java.lang.Object
implements SecurityPolicyRule<javax.servlet.ServletRequest>

An implementation of SecurityPolicyRule which processes SAML 1 messages and extracts relevant information out for use in other rules.


Constructor Summary
SAML1ProtocolMessageRuleFactory.SAML1ProtocolMessageRule()
           
 
Method Summary
 void evaluate(javax.servlet.ServletRequest request, XMLObject message, SecurityPolicyContext context)
          Evaluates the rule against the given request and message.
protected  void extractRequestInfo(SAMLSecurityPolicyContext samlContext, RequestAbstractType request)
          Extract information from a SAML RequestAbstractType message.
protected  void extractResponseInfo(SAMLSecurityPolicyContext samlContext, ResponseAbstractType response)
          Extract information from a SAML StatusResponse message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAML1ProtocolMessageRuleFactory.SAML1ProtocolMessageRule

public SAML1ProtocolMessageRuleFactory.SAML1ProtocolMessageRule()
Method Detail

evaluate

public void evaluate(javax.servlet.ServletRequest request,
                     XMLObject message,
                     SecurityPolicyContext context)
              throws SecurityPolicyException
Evaluates the rule against the given request and message.

Specified by:
evaluate in interface SecurityPolicyRule<javax.servlet.ServletRequest>
Parameters:
request - the protocol request
message - the incoming message
context - the security policy context to use for evaluation and storage of related state info
Throws:
SecurityPolicyException - thrown if the request/message do not meet the requirements of this rule

extractResponseInfo

protected void extractResponseInfo(SAMLSecurityPolicyContext samlContext,
                                   ResponseAbstractType response)
                            throws SecurityPolicyException
Extract information from a SAML StatusResponse message.

Parameters:
samlContext - the security policy context in which to store information
response - the SAML message to process
Throws:
SecurityPolicyException - thrown if the assertions within the response contain differening issuer IDs

extractRequestInfo

protected void extractRequestInfo(SAMLSecurityPolicyContext samlContext,
                                  RequestAbstractType request)
Extract information from a SAML RequestAbstractType message.

Parameters:
samlContext - the security policy context in which to store information
request - the SAML message to process