Change audience handling and validators to separate out entityID.
[shibboleth/opensaml2.git] / saml / saml1 / profile / BrowserSSOProfileValidator.h
1 /*
2  *  Copyright 2001-2007 Internet2
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * @file saml/saml1/profile/BrowserSSOProfileValidator.h
19  * 
20  * SAML 1.x Browser SSO Profile Assertion Validator 
21  */
22
23 #ifndef __saml1_ssoval_h__
24 #define __saml1_ssoval_h__
25
26 #include <saml/saml1/profile/AssertionValidator.h>
27
28 namespace opensaml {
29     namespace saml1 {
30         
31         /**
32          * SAML 1.x Browser SSO Profile Assertion Validator
33          *
34          * <p>In addition to standard core requirements for validity, SSO assertions
35          * <strong>MUST</strong> have NotBefore/NotOnOrAfter attributes and each subject statement
36          * <strong>MUST</strong> be confirmable via bearer or artifact method.
37          */
38         class SAML_API BrowserSSOProfileValidator : public AssertionValidator
39         {
40         public:
41             /**
42              * Constructor
43              * 
44              * @recipient       name of assertion recipient (implicit audience)
45              * @param audiences additional audience values
46              * @param ts        timestamp to evaluate assertion conditions, or 0 to bypass check
47              */
48             BrowserSSOProfileValidator(const XMLCh* recipient, const std::vector<const XMLCh*>* audiences=NULL, time_t ts=0)
49                 : AssertionValidator(recipient, audiences, ts) {
50             }
51             virtual ~BrowserSSOProfileValidator() {}
52     
53             void validateAssertion(const Assertion& assertion) const;
54         };
55         
56     };
57 };
58
59 #endif /* __saml1_ssoval_h__ */