2 * Copyright 2001-2007 Internet2
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file saml/saml2/profile/BrowserSSOProfileValidator.h
20 * SAML 2.0 Browser SSO Profile Assertion Validator
23 #ifndef __saml2_ssoval_h__
24 #define __saml2_ssoval_h__
26 #include <saml/saml2/profile/AssertionValidator.h>
34 * SAML 2.0 Browser SSO Profile Assertion Validator
36 * <p>In addition to standard core requirements for validity, SSO assertions
37 * <strong>MUST</strong> have NotBefore/NotOnOrAfter attributes and each subject statement
38 * <strong>MUST</strong> be confirmable via bearer method.
40 class SAML_API BrowserSSOProfileValidator : public AssertionValidator
46 * @param recipient name of assertion recipient (implicit audience)
47 * @param audiences additional audience values
48 * @param ts timestamp to evaluate assertion conditions, or 0 to bypass check
49 * @param destination server location to which assertion was delivered, or 0 to bypass check
50 * @param requestID ID of request that resulted in assertion, or NULL if unsolicited
52 BrowserSSOProfileValidator(
53 const XMLCh* recipient,
54 const std::vector<const XMLCh*>* audiences=NULL,
56 const char* destination=NULL,
57 const char* requestID=NULL
58 ) : AssertionValidator(recipient, audiences, ts), m_destination(destination), m_requestID(requestID) {
60 virtual ~BrowserSSOProfileValidator() {}
62 void validateAssertion(const Assertion& assertion) const;
65 * Return address information from the confirmed bearer SubjectConfirmation, if any.
67 * @return address information
69 const char* getAddress() const {
70 return m_address.c_str();
74 /** Server location to which assertion was delivered. */
75 xmltooling::auto_ptr_XMLCh m_destination;
77 /** ID of request that resulted in assertions. */
78 xmltooling::auto_ptr_XMLCh m_requestID;
81 /** Address in confirmed bearer SubjectConfirmationData. */
82 mutable std::string m_address;
88 #endif /* __saml2_ssoval_h__ */