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_SAML2_ASSERTION_H__
25 #define __LASSO_SAML2_ASSERTION_H__
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* __cplusplus */
30 
31 
32 #define LASSO_TYPE_SAML2_ASSERTION (lasso_saml2_assertion_get_type())
33 #define LASSO_SAML2_ASSERTION(obj) \
34 	(G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_SAML2_ASSERTION, \
35 				LassoSaml2Assertion))
36 #define LASSO_SAML2_ASSERTION_CLASS(klass) \
37 	(G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_SAML2_ASSERTION, \
38 				LassoSaml2AssertionClass))
39 #define LASSO_IS_SAML2_ASSERTION(obj) \
40 	(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_SAML2_ASSERTION))
41 #define LASSO_IS_SAML2_ASSERTION_CLASS(klass) \
42 	(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_SAML2_ASSERTION))
43 #define LASSO_SAML2_ASSERTION_GET_CLASS(o) \
44 	(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_SAML2_ASSERTION, \
45 				LassoSaml2AssertionClass))
46 
47 typedef struct _LassoSaml2Assertion LassoSaml2Assertion;
48 typedef struct _LassoSaml2AssertionClass LassoSaml2AssertionClass;
49 
50 #include "saml2_advice.h"
51 #include "saml2_conditions.h"
52 #include "saml2_subject.h"
53 #include "saml2_name_id.h"
54 
55 #include "../xml_enc.h"
56 
57 struct _LassoSaml2Assertion {
58 	LassoNode parent;
59 
60 	/*< public >*/
61 	/* elements */
62 	LassoSaml2NameID *Issuer;
63 	LassoSaml2Subject *Subject;
64 	LassoSaml2Conditions *Conditions;
65 	LassoSaml2Advice *Advice;
66 	GList *Statement; /* of LassoSaml2StatementAbstract */
67 	GList *AuthnStatement; /* of LassoSaml2AuthnStatement */
68 	GList *AuthzDecisionStatement; /* of LassoSaml2AuthzDecisionStatement */
69 	GList *AttributeStatement; /* of LassoSaml2AttributeStatement */
70 	/* attributes */
71 	char *Version;
72 	char *ID;
73 	char *IssueInstant;
74 	/*< private >*/
75 	/* ds:Signature stuffs */
76 	LassoSignatureType sign_type;
77 	LassoSignatureMethod sign_method;
78 	char *private_key_file;
79 	char *certificate_file;
80 	gboolean encryption_activated;
81 	char *encryption_public_key_str;
82 	LassoEncryptionSymKeyType encryption_sym_key_type;
83 };
84 
85 
86 struct _LassoSaml2AssertionClass {
87 	LassoNodeClass parent;
88 };
89 
90 LASSO_EXPORT GType lasso_saml2_assertion_get_type(void);
91 LASSO_EXPORT LassoNode* lasso_saml2_assertion_new(void);
92 
93 
94 
95 #ifdef __cplusplus
96 }
97 #endif /* __cplusplus */
98 
99 #endif /* __LASSO_SAML2_ASSERTION_H__ */
100