Suppress dll-interface warnings.
[shibboleth/cpp-opensaml.git] / saml / saml2 / profile / BrowserSSOProfileValidator.h
1 /*
2  *  Copyright 2001-2010 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/saml2/profile/BrowserSSOProfileValidator.h
19  *
20  * SAML 2.0 Browser SSO Profile Assertion Validator.
21  */
22
23 #ifndef __saml2_ssoval_h__
24 #define __saml2_ssoval_h__
25
26 #include <saml/saml2/profile/AssertionValidator.h>
27
28 #include <xmltooling/unicode.h>
29
30 namespace opensaml {
31     namespace saml2 {
32
33 #if defined (_MSC_VER)
34     #pragma warning( push )
35     #pragma warning( disable : 4251 )
36 #endif
37
38         /**
39          * @deprecated
40          * SAML 2.0 Browser SSO Profile Assertion Validator
41          *
42          * <p>In addition to standard core requirements for validity, SSO assertions
43          * <strong>MUST</strong> be bearer-confirmable.
44          */
45         class SAML_API BrowserSSOProfileValidator : public AssertionValidator
46         {
47         public:
48             /**
49              * Constructor
50              *
51              * @param recipient     name of assertion recipient (implicit audience)
52              * @param audiences     additional audience values
53              * @param ts            timestamp to evaluate assertion conditions, or 0 to bypass check
54              * @param destination   server location to which assertion was delivered, or 0 to bypass check
55              * @param requestID     ID of request that resulted in assertion, or nullptr if unsolicited
56              */
57             BrowserSSOProfileValidator(
58                 const XMLCh* recipient,
59                 const std::vector<const XMLCh*>* audiences=nullptr,
60                 time_t ts=0,
61                 const char* destination=nullptr,
62                 const char* requestID=nullptr
63                 );
64
65             virtual ~BrowserSSOProfileValidator();
66
67             void validateAssertion(const Assertion& assertion) const;
68
69             /**
70              * Return address information from the confirmed bearer SubjectConfirmation, if any.
71              *
72              * @return  address information
73              */
74             const char* getAddress() const;
75
76         protected:
77             /** Server location to which assertion was delivered. */
78             xmltooling::auto_ptr_XMLCh m_destination;
79
80             /** ID of request that resulted in assertions. */
81             xmltooling::auto_ptr_XMLCh m_requestID;
82
83         private:
84             /** Address in confirmed bearer SubjectConfirmationData. */
85             mutable std::string m_address;
86         };
87
88 #if defined (_MSC_VER)
89     #pragma warning( pop )
90 #endif
91
92     };
93 };
94
95 #endif /* __saml2_ssoval_h__ */