1 /* $Id$
2  *
3  * Lasso - A free implementation of the Liberty Alliance specifications.
4  *
5  * Copyright (C) 2004-2007 Entr'ouvert
6  * http://lasso.entrouvert.org
7  *
8  * Authors: See AUTHORS file in top-level directory.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef __LASSO_SAML_ASSERTION_H__
25 #define __LASSO_SAML_ASSERTION_H__
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* __cplusplus */
30 
31 #include "xml.h"
32 #include "saml_advice.h"
33 #include "saml_authentication_statement.h"
34 #include "saml_conditions.h"
35 #include "saml_statement_abstract.h"
36 #include "saml_subject_statement.h"
37 #include "saml_attribute_statement.h"
38 
39 #define LASSO_TYPE_SAML_ASSERTION (lasso_saml_assertion_get_type())
40 #define LASSO_SAML_ASSERTION(obj) \
41 	(G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_SAML_ASSERTION, LassoSamlAssertion))
42 #define LASSO_SAML_ASSERTION_CLASS(klass) \
43 	(G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_SAML_ASSERTION, LassoSamlAssertionClass))
44 #define LASSO_IS_SAML_ASSERTION(obj) \
45 	(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_SAML_ASSERTION))
46 #define LASSO_IS_SAML_ASSERTION_CLASS(klass) \
47 	(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_SAML_ASSERTION))
48 #define LASSO_SAML_ASSERTION_GET_CLASS(o) \
49 	(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_SAML_ASSERTION, LassoSamlAssertionClass))
50 
51 typedef struct _LassoSamlAssertion LassoSamlAssertion;
52 typedef struct _LassoSamlAssertionClass LassoSamlAssertionClass;
53 
54 struct _LassoSamlAssertion {
55 	LassoNode parent;
56 
57 	/*< public >*/
58 	/* <element ref="saml:Conditions" minOccurs="0"/> */
59 	LassoSamlConditions *Conditions;
60 	/* <element ref="saml:Advice" minOccurs="0"/> */
61 	LassoSamlAdvice *Advice;
62 	void *Statement; /* XXX LassoSamlStatement missing from lasso */
63 	LassoSamlSubjectStatement *SubjectStatement;
64 	LassoSamlAuthenticationStatement *AuthenticationStatement;
65 	void *AuthorizationDecisionStatement;
66 		/* XXX LassoSamlAuthorizationDecisionStatement missing from lasso*/
67 	LassoSamlAttributeStatement *AttributeStatement;
68 
69 	int MajorVersion;
70 	int MinorVersion;
71 	char *AssertionID;
72 	char *Issuer;
73 	char *IssueInstant;
74 
75 	/* ds:Signature stuff */
76 	LassoSignatureType sign_type;
77 	LassoSignatureMethod sign_method;
78 	char *private_key_file;
79 	char *certificate_file;
80 };
81 
82 struct _LassoSamlAssertionClass {
83 	LassoNodeClass parent;
84 };
85 
86 LASSO_EXPORT GType lasso_saml_assertion_get_type(void);
87 LASSO_EXPORT LassoSamlAssertion* lasso_saml_assertion_new(void);
88 
89 #ifdef __cplusplus
90 }
91 #endif /* __cplusplus */
92 
93 #endif /* __LASSO_SAML_ASSERTION_H__ */
94