1
/* $Id: saml_authority_binding.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_authority_binding.h>
29
The schema fragment (oasis-sstc-saml-schema-assertion-1.0.xsd):
31
<element name="AuthorityBinding" type="saml:AuthorityBindingType"/>
32
<complexType name="AuthorityBindingType">
33
<attribute name="AuthorityKind" type="QName" use="required"/>
34
<attribute name="Location" type="anyURI" use="required"/>
35
<attribute name="Binding" type="anyURI" use="required"/>
40
/*****************************************************************************/
42
/*****************************************************************************/
45
lasso_saml_authority_binding_set_authorityKind(LassoSamlAuthorityBinding *node,
46
const xmlChar *authorityKind)
48
LassoNodeClass *class;
49
g_assert(LASSO_IS_SAML_AUTHORITY_BINDING(node));
50
g_assert(authorityKind != NULL);
52
class = LASSO_NODE_GET_CLASS(node);
53
class->set_prop(LASSO_NODE (node), "AuthorityKind", authorityKind);
57
lasso_saml_authority_binding_set_binding(LassoSamlAuthorityBinding *node,
58
const xmlChar *binding)
60
LassoNodeClass *class;
61
g_assert(LASSO_IS_SAML_AUTHORITY_BINDING(node));
62
g_assert(binding != NULL);
64
class = LASSO_NODE_GET_CLASS(node);
65
class->set_prop(LASSO_NODE (node), "Binding", binding);
69
lasso_saml_authority_binding_set_location(LassoSamlAuthorityBinding *node,
70
const xmlChar *location)
72
LassoNodeClass *class;
73
g_assert(LASSO_IS_SAML_AUTHORITY_BINDING(node));
74
g_assert(location != NULL);
76
class = LASSO_NODE_GET_CLASS(node);
77
class->set_prop(LASSO_NODE (node), "Location", location);
80
/*****************************************************************************/
81
/* instance and class init functions */
82
/*****************************************************************************/
85
lasso_saml_authority_binding_instance_init(LassoSamlAuthorityBinding *node)
87
LassoNodeClass *class = LASSO_NODE_GET_CLASS(LASSO_NODE(node));
89
class->set_ns(LASSO_NODE(node), lassoSamlAssertionHRef,
90
lassoSamlAssertionPrefix);
91
class->set_name(LASSO_NODE(node), "AuthorityBinding");
95
lasso_saml_authority_binding_class_init(LassoSamlAuthorityBindingClass *klass)
99
GType lasso_saml_authority_binding_get_type() {
100
static GType this_type = 0;
103
static const GTypeInfo this_info = {
104
sizeof (LassoSamlAuthorityBindingClass),
107
(GClassInitFunc) lasso_saml_authority_binding_class_init,
110
sizeof(LassoSamlAuthorityBinding),
112
(GInstanceInitFunc) lasso_saml_authority_binding_instance_init,
115
this_type = g_type_register_static(LASSO_TYPE_NODE,
116
"LassoSamlAuthorityBinding",
123
* lasso_saml_authority_binding_new:
125
* Creates a new <saml:AuthorityBinding> node object.
127
* Return value: the new @LassoSamlAuthorityBinding
129
LassoNode* lasso_saml_authority_binding_new()
131
return LASSO_NODE(g_object_new(LASSO_TYPE_SAML_AUTHORITY_BINDING, NULL));