1
/* $Id: saml_subject_confirmation.c,v 1.4 2004/08/13 15:16:13 fpeters Exp $
3
* Lasso - A free implementation of the Samlerty Alliance specifications.
5
* Copyright (C) 2004 Entr'ouvert
6
* http://lasso.entrouvert.org
8
* Authors: Nicolas Clapies <nclapies@entrouvert.com>
9
* Valery Febvre <vfebvre@easter-eggs.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/xml/saml_subject_confirmation.h>
29
The schema fragment (oasis-sstc-saml-schema-assertion-1.0.xsd):
31
<element name="SubjectConfirmation" type="saml:SubjectConfirmationType"/>
32
<complexType name="SubjectConfirmationType">
34
<element ref="saml:ConfirmationMethod" maxOccurs="unbounded"/>
35
<element ref="saml:SubjectConfirmationData" minOccurs="0"/>
36
<element ref="ds:KeyInfo" minOccurs="0"/>
40
<element name="SubjectConfirmationData" type="anyType"/>
41
<element name="ConfirmationMethod" type="anyURI"/>
44
/*****************************************************************************/
46
/*****************************************************************************/
49
lasso_saml_subject_confirmation_add_confirmationMethod(LassoSamlSubjectConfirmation *node,
50
const xmlChar *confirmationMethod)
52
LassoNodeClass *class;
53
g_assert(LASSO_IS_SAML_SUBJECT_CONFIRMATION(node));
54
g_assert(confirmationMethod != NULL);
56
class = LASSO_NODE_GET_CLASS(node);
57
class->new_child(LASSO_NODE (node),
58
"ConfirmationMethod", confirmationMethod, TRUE);
62
lasso_saml_subject_confirmation_set_subjectConfirmationMethod(LassoSamlSubjectConfirmation *node,
63
const xmlChar *subjectConfirmationMethod)
65
LassoNodeClass *class;
66
g_assert(LASSO_IS_SAML_SUBJECT_CONFIRMATION(node));
67
g_assert(subjectConfirmationMethod != NULL);
69
class = LASSO_NODE_GET_CLASS(node);
70
class->new_child(LASSO_NODE (node),
71
"SubjectConfirmationMethod", subjectConfirmationMethod,
75
/*****************************************************************************/
76
/* instance and class init functions */
77
/*****************************************************************************/
80
lasso_saml_subject_confirmation_instance_init(LassoSamlSubjectConfirmation *node)
82
LassoNodeClass *class = LASSO_NODE_GET_CLASS(LASSO_NODE(node));
84
class->set_ns(LASSO_NODE(node), lassoSamlAssertionHRef,
85
lassoSamlAssertionPrefix);
86
class->set_name(LASSO_NODE(node), "SubjectConfirmation");
90
lasso_saml_subject_confirmation_class_init(LassoSamlSubjectConfirmationClass *klass)
94
GType lasso_saml_subject_confirmation_get_type() {
95
static GType this_type = 0;
98
static const GTypeInfo this_info = {
99
sizeof (LassoSamlSubjectConfirmationClass),
102
(GClassInitFunc) lasso_saml_subject_confirmation_class_init,
105
sizeof(LassoSamlSubjectConfirmation),
107
(GInstanceInitFunc) lasso_saml_subject_confirmation_instance_init,
110
this_type = g_type_register_static(LASSO_TYPE_NODE,
111
"LassoSamlSubjectConfirmation",
118
* lasso_saml_subject_confirmation_new:
120
* Creates a new <saml:SubjectConfirmation> node object.
122
* Return value: the new @LassoSamlSubjectConfirmation
124
LassoNode* lasso_saml_subject_confirmation_new()
126
return LASSO_NODE(g_object_new(LASSO_TYPE_SAML_SUBJECT_CONFIRMATION, NULL));