summaryrefslogtreecommitdiffstats
path: root/lasso/xml/lib_authn_response_envelope.c
diff options
context:
space:
mode:
authorNicolas Clapies <nclapies@entrouvert.com>2004-07-22 12:52:09 +0000
committerNicolas Clapies <nclapies@entrouvert.com>2004-07-22 12:52:09 +0000
commit425af0d33bc5ef41a2f6a0073fe1fb0ea59348e9 (patch)
tree93c9256f06c3c8fdb96e7ac853356fe6b6161af0 /lasso/xml/lib_authn_response_envelope.c
parentab2c04097960993553f6eadd5fbca32e7f9c4de8 (diff)
downloadlasso-425af0d33bc5ef41a2f6a0073fe1fb0ea59348e9.tar.gz
lasso-425af0d33bc5ef41a2f6a0073fe1fb0ea59348e9.tar.xz
lasso-425af0d33bc5ef41a2f6a0073fe1fb0ea59348e9.zip
xml low level implementation of LECP
Diffstat (limited to 'lasso/xml/lib_authn_response_envelope.c')
-rw-r--r--lasso/xml/lib_authn_response_envelope.c111
1 files changed, 111 insertions, 0 deletions
diff --git a/lasso/xml/lib_authn_response_envelope.c b/lasso/xml/lib_authn_response_envelope.c
new file mode 100644
index 00000000..2b23e4e6
--- /dev/null
+++ b/lasso/xml/lib_authn_response_envelope.c
@@ -0,0 +1,111 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Nicolas Clapies <nclapies@entrouvert.com>
+ * Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <lasso/xml/lib_authn_response_envelope.h>
+
+
+
+/*****************************************************************************/
+/* public methods */
+/*****************************************************************************/
+
+void
+lasso_lib_authn_response_envelope_set_extension(LassoLibAuthnResponseEnvelope *node,
+ LassoNode *extension)
+{
+ g_assert(LASSO_IS_LIB_AUTHN_RESPONSE_ENVELOPE(node));
+ g_assert(LASSO_NODE(extension));
+
+ LassoNodeClass *class = LASSO_NODE_GET_CLASS(node);
+ class->add_child(LASSO_NODE(extension), extension, FALSE);
+}
+
+void
+lasso_lib_authn_response_envelope_set_authnResponse(LassoLibAuthnResponseEnvelope *node,
+ LassoLibAuthnResponse *authnResponse_node)
+{
+ g_assert(LASSO_IS_LIB_AUTHN_RESPONSE_ENVELOPE(node));
+ g_assert(LASSO_IS_LIB_AUTHN_RESPONSE(authnResponse_node));
+
+ LassoNodeClass *class = LASSO_NODE_GET_CLASS(node);
+ class->add_child(LASSO_NODE(node), LASSO_NODE(authnResponse_node), FALSE);
+}
+
+void
+lasso_lib_authn_response_envelope_set_assertionConsumerServiceURL(LassoLibAuthnResponseEnvelope *node,
+ const xmlChar *url) {
+ g_assert(LASSO_IS_LIB_AUTHN_RESPONSE_ENVELOPE(node));
+ g_assert(url != NULL);
+
+ LassoNodeClass *class = LASSO_NODE_GET_CLASS(node);
+ class->new_child(LASSO_NODE (node), "AssertionConsumerServiceURL",
+ url, FALSE);
+}
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+lasso_lib_authn_response_envelope_instance_init(LassoLibAuthnResponseEnvelope *node)
+{
+ LassoNodeClass *class = LASSO_NODE_GET_CLASS(LASSO_NODE(node));
+
+ class->set_ns(LASSO_NODE(node), lassoLibHRef, lassoLibPrefix);
+ class->set_name(LASSO_NODE(node), "AuthnResponseEnvelope");
+}
+
+static void
+lasso_lib_authn_response_envelope_class_init(LassoLibAuthnResponseEnvelopeClass *class)
+{
+}
+
+GType lasso_lib_authn_response_envelope_get_type() {
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoLibAuthnResponseEnvelopeClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) lasso_lib_authn_response_envelope_class_init,
+ NULL,
+ NULL,
+ sizeof(LassoLibAuthnResponseEnvelope),
+ 0,
+ (GInstanceInitFunc) lasso_lib_authn_response_envelope_instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_NODE,
+ "LassoLibAuthnResponseEnvelope",
+ &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoNode* lasso_lib_authn_response_envelope_new() {
+ return LASSO_NODE(g_object_new(LASSO_TYPE_LIB_AUTHN_RESPONSE_ENVELOPE,
+ NULL));
+}