1
/* $Id: lib_register_name_identifier_request.c,v 1.8 2004/08/13 15:16:13 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: 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/lib_register_name_identifier_request.h>
29
The Schema fragment (liberty-idff-protocols-schema-v1.2.xsd):
31
<xs:element name="RegisterNameIdentifierRequest" type="RegisterNameIdentifierRequestType"/>
32
<xs:complexType name="RegisterNameIdentifierRequestType">
34
<xs:extension base="samlp:RequestAbstractType">
36
<xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/>
37
<xs:element ref="ProviderID"/>
38
<xs:element ref="IDPProvidedNameIdentifier"/>
39
<xs:element ref="SPProvidedNameIdentifier"/>
40
<xs:element ref="OldProvidedNameIdentifier"/>
41
<xs:element ref="RelayState" minOccurs="0"/>
46
<xs:element name="IDPProvidedNameIdentifier" type="saml:NameIdentifierType"/>
47
<xs:element name="SPProvidedNameIdentifier" type="saml:NameIdentifierType"/>
48
<xs:element name="OldProvidedNameIdentifier" type="saml:NameIdentifierType"/>
50
<xs:element name="ProviderID" type="md:entityIDType"/>
51
<xs:element name="RelayState" type="xs:string"/>
53
From liberty-metadata-v1.0.xsd:
54
<xs:simpleType name="entityIDType">
55
<xs:restriction base="xs:anyURI">
56
<xs:maxLength value="1024" id="maxlengthid"/>
62
/*****************************************************************************/
64
/*****************************************************************************/
67
lasso_lib_register_name_identifier_request_set_idpProvidedNameIdentifier(LassoLibRegisterNameIdentifierRequest *node,
68
LassoLibIDPProvidedNameIdentifier *idpProvidedNameIdentifier)
70
LassoNodeClass *class;
71
g_assert(LASSO_IS_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(node));
72
g_assert(LASSO_IS_LIB_IDP_PROVIDED_NAME_IDENTIFIER(idpProvidedNameIdentifier));
74
class = LASSO_NODE_GET_CLASS(node);
75
class->add_child(LASSO_NODE (node),
76
LASSO_NODE (idpProvidedNameIdentifier),
81
lasso_lib_register_name_identifier_request_set_oldProvidedNameIdentifier(LassoLibRegisterNameIdentifierRequest *node,
82
LassoLibOLDProvidedNameIdentifier *oldProvidedNameIdentifier)
84
LassoNodeClass *class;
85
g_assert(LASSO_IS_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(node));
86
g_assert(LASSO_IS_LIB_OLD_PROVIDED_NAME_IDENTIFIER(oldProvidedNameIdentifier));
88
class = LASSO_NODE_GET_CLASS(node);
89
class->add_child(LASSO_NODE (node),
90
LASSO_NODE (oldProvidedNameIdentifier),
95
lasso_lib_register_name_identifier_request_set_providerID(LassoLibRegisterNameIdentifierRequest *node,
96
const xmlChar *providerID)
98
LassoNodeClass *class;
99
g_assert(LASSO_IS_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(node));
100
g_assert(providerID != NULL);
101
/* FIXME : providerID length SHOULD be <= 1024 */
103
class = LASSO_NODE_GET_CLASS(node);
104
class->new_child(LASSO_NODE (node), "ProviderID", providerID, FALSE);
108
lasso_lib_register_name_identifier_request_set_relayState(LassoLibRegisterNameIdentifierRequest *node,
109
const xmlChar *relayState)
111
LassoNodeClass *class;
112
g_assert(LASSO_IS_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(node));
113
g_assert(relayState != NULL);
115
class = LASSO_NODE_GET_CLASS(node);
116
class->new_child(LASSO_NODE (node), "RelayState", relayState, FALSE);
120
lasso_lib_register_name_identifier_request_set_spProvidedNameIdentifier(LassoLibRegisterNameIdentifierRequest *node,
121
LassoLibSPProvidedNameIdentifier *spProvidedNameIdentifier)
123
LassoNodeClass *class;
124
g_assert(LASSO_IS_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(node));
125
g_assert(LASSO_IS_LIB_SP_PROVIDED_NAME_IDENTIFIER(spProvidedNameIdentifier));
127
class = LASSO_NODE_GET_CLASS(node);
128
class->add_child(LASSO_NODE (node),
129
LASSO_NODE (spProvidedNameIdentifier),
133
/*****************************************************************************/
134
/* instance and class init functions */
135
/*****************************************************************************/
138
lasso_lib_register_name_identifier_request_instance_init(LassoLibRegisterNameIdentifierRequest *node)
140
LassoNodeClass *class = LASSO_NODE_GET_CLASS(LASSO_NODE(node));
142
class->set_ns(LASSO_NODE(node), lassoLibHRef, lassoLibPrefix);
143
class->set_name(LASSO_NODE(node), "RegisterNameIdentifierRequest");
147
lasso_lib_register_name_identifier_request_class_init(LassoLibRegisterNameIdentifierRequestClass *klass)
151
GType lasso_lib_register_name_identifier_request_get_type() {
152
static GType this_type = 0;
155
static const GTypeInfo this_info = {
156
sizeof (LassoLibRegisterNameIdentifierRequestClass),
159
(GClassInitFunc) lasso_lib_register_name_identifier_request_class_init,
162
sizeof(LassoLibRegisterNameIdentifierRequest),
164
(GInstanceInitFunc) lasso_lib_register_name_identifier_request_instance_init,
167
this_type = g_type_register_static(LASSO_TYPE_SAMLP_REQUEST_ABSTRACT,
168
"LassoLibRegisterNameIdentifierRequest",
174
LassoNode* lasso_lib_register_name_identifier_request_new() {
175
return LASSO_NODE(g_object_new(LASSO_TYPE_LIB_REGISTER_NAME_IDENTIFIER_REQUEST,