Starting SAML 1.x implementation.
[shibboleth/cpp-opensaml.git] / saml / saml1 / core / Assertions.h
1 /*
2  *  Copyright 2001-2006 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 Assertions.h
19  * 
20  * XMLObjects representing the SAML 1.x Assertions schema
21  */
22
23 #ifndef __saml_assertions_h__
24 #define __saml_assertions_h__
25
26 #include <saml/exceptions.h>
27 #include <saml/util/XMLConstants.h>
28 #include <xmltooling/ElementProxy.h>
29 #include <xmltooling/SimpleElement.h>
30 #include <xmltooling/XMLObjectBuilder.h>
31 #include <xmltooling/validation/ValidatingXMLObject.h>
32
33 #define DECL_SAML1OBJECTBUILDER(cname) \
34     DECL_XMLOBJECTBUILDER(SAML_API,cname,opensaml::XMLConstants::SAML1_NS,opensaml::XMLConstants::SAML1_PREFIX)
35
36 namespace opensaml {
37
38     /**
39      * @namespace saml1
40      * SAML 1.x class namespace
41      */
42     namespace saml1 {
43         DECL_XMLOBJECT_SIMPLE(SAML_API,AssertionIDReference,Reference,SAML 1.x AssertionIDReference element);
44         DECL_XMLOBJECT_SIMPLE(SAML_API,Audience,Uri,SAML 1.x Audience element);
45         DECL_XMLOBJECT_SIMPLE(SAML_API,ConfirmationMethod,Method,SAML 1.x ConfirmationMethod element);
46         
47         DECL_SAML1OBJECTBUILDER(AssertionIDReference);
48         DECL_SAML1OBJECTBUILDER(Audience);
49         DECL_SAML1OBJECTBUILDER(ConfirmationMethod);
50         
51 #ifdef SAML_DECLARE_VALIDATORS
52         XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
53         XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,Audience);
54         XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
55 #endif
56     };
57 };
58
59 #endif /* __saml_assertions_h__ */