1
/* $Id: samlp2_authn_query.c,v 1.2 2005/11/21 18:51:52 fpeters Exp $
3
* Lasso - A free implementation of the Liberty Alliance specifications.
5
* Copyright (C) 2004, 2005 Entr'ouvert
6
* http://lasso.entrouvert.org
8
* Authors: See AUTHORS file in top-level directory.
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.
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.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
#include "samlp2_authn_query.h"
28
* Schema fragment (saml-schema-protocol-2.0.xsd):
30
* <complexType name="AuthnQueryType">
32
* <extension base="samlp:SubjectQueryAbstractType">
34
* <element ref="samlp:RequestedAuthnContext" minOccurs="0"/>
36
* <attribute name="SessionIndex" type="string" use="optional"/>
42
/*****************************************************************************/
44
/*****************************************************************************/
47
static struct XmlSnippet schema_snippets[] = {
48
{ "RequestedAuthnContext", SNIPPET_NODE,
49
G_STRUCT_OFFSET(LassoSamlp2AuthnQuery, RequestedAuthnContext) },
50
{ "SessionIndex", SNIPPET_ATTRIBUTE,
51
G_STRUCT_OFFSET(LassoSamlp2AuthnQuery, SessionIndex) },
55
static LassoNodeClass *parent_class = NULL;
58
/*****************************************************************************/
59
/* instance and class init functions */
60
/*****************************************************************************/
63
instance_init(LassoSamlp2AuthnQuery *node)
65
node->RequestedAuthnContext = NULL;
66
node->SessionIndex = NULL;
70
class_init(LassoSamlp2AuthnQueryClass *klass)
72
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
74
parent_class = g_type_class_peek_parent(klass);
75
nclass->node_data = g_new0(LassoNodeClassData, 1);
76
lasso_node_class_set_nodename(nclass, "AuthnQuery");
77
lasso_node_class_set_ns(nclass, LASSO_SAML2_PROTOCOL_HREF, LASSO_SAML2_PROTOCOL_PREFIX);
78
lasso_node_class_add_snippets(nclass, schema_snippets);
82
lasso_samlp2_authn_query_get_type()
84
static GType this_type = 0;
87
static const GTypeInfo this_info = {
88
sizeof (LassoSamlp2AuthnQueryClass),
91
(GClassInitFunc) class_init,
94
sizeof(LassoSamlp2AuthnQuery),
96
(GInstanceInitFunc) instance_init,
99
this_type = g_type_register_static(LASSO_TYPE_SAMLP2_SUBJECT_QUERY_ABSTRACT,
100
"LassoSamlp2AuthnQuery", &this_info, 0);
106
* lasso_samlp2_authn_query_new:
108
* Creates a new #LassoSamlp2AuthnQuery object.
110
* Return value: a newly created #LassoSamlp2AuthnQuery object
113
lasso_samlp2_authn_query_new()
115
return g_object_new(LASSO_TYPE_SAMLP2_AUTHN_QUERY, NULL);