1
/* $Id: assertion.c,v 1.6 2004/09/01 09:59:53 fpeters Exp $
3
* Lasso - A free implementation of the Liberty Alliance specifications.
5
* Copyright (C) 2004 Entr'ouvert
6
* http://lasso.entrouvert.org
8
* Authors: Valery Febvre <vfebvre@easter-eggs.com>
9
* Nicolas Clapies <nclapies@entrouvert.com>
11
* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2 of the License, or
14
* (at your option) any later version.
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
21
* You should have received a copy of the GNU General Public License
22
* along with this program; if not, write to the Free Software
23
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
#include <lasso/protocols/elements/assertion.h>
28
/*****************************************************************************/
30
/*****************************************************************************/
32
/*****************************************************************************/
33
/* instance and class init functions */
34
/*****************************************************************************/
37
lasso_assertion_instance_init(LassoAssertion *assertion)
42
lasso_assertion_class_init(LassoAssertionClass *class)
46
GType lasso_assertion_get_type() {
47
static GType this_type = 0;
50
static const GTypeInfo this_info = {
51
sizeof (LassoAssertionClass),
54
(GClassInitFunc) lasso_assertion_class_init,
57
sizeof(LassoAssertion),
59
(GInstanceInitFunc) lasso_assertion_instance_init,
62
this_type = g_type_register_static(LASSO_TYPE_LIB_ASSERTION,
70
lasso_assertion_new(const xmlChar *issuer,
76
g_return_val_if_fail(issuer != NULL, NULL);
78
assertion = LASSO_NODE(g_object_new(LASSO_TYPE_ASSERTION,
82
id = lasso_build_unique_id(32);
83
lasso_saml_assertion_set_assertionID(LASSO_SAML_ASSERTION(assertion),
86
lasso_saml_assertion_set_majorVersion(LASSO_SAML_ASSERTION(assertion),
87
lassoLibMajorVersion);
88
lasso_saml_assertion_set_minorVersion(LASSO_SAML_ASSERTION(assertion),
89
lassoLibMinorVersion);
90
time = lasso_get_current_time();
91
lasso_saml_assertion_set_issueInstant(LASSO_SAML_ASSERTION(assertion),
92
(const xmlChar *)time);
95
lasso_saml_assertion_set_issuer(LASSO_SAML_ASSERTION(assertion), issuer);
98
if (requestID != NULL) {
99
lasso_lib_assertion_set_inResponseTo(LASSO_LIB_ASSERTION(assertion),