diff options
author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-05-13 23:53:21 +0000 |
---|---|---|
committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-05-13 23:53:21 +0000 |
commit | 35c7dc78a475b2ca4a218fa4da9c681250d08f87 (patch) | |
tree | ade42135337a019fb214fb0654eae86966d09154 /lasso/Attic | |
parent | 21be1b2799a463357f5cce0d6e73b6f647024ef0 (diff) | |
download | lasso-35c7dc78a475b2ca4a218fa4da9c681250d08f87.tar.gz lasso-35c7dc78a475b2ca4a218fa4da9c681250d08f87.tar.xz lasso-35c7dc78a475b2ca4a218fa4da9c681250d08f87.zip |
A new constructor added: authn_response_new_from_export()
Diffstat (limited to 'lasso/Attic')
-rw-r--r-- | lasso/Attic/protocols/authn_response.c | 25 | ||||
-rw-r--r-- | lasso/Attic/protocols/authn_response.h | 3 |
2 files changed, 28 insertions, 0 deletions
diff --git a/lasso/Attic/protocols/authn_response.c b/lasso/Attic/protocols/authn_response.c index f99c38f2..6efead45 100644 --- a/lasso/Attic/protocols/authn_response.c +++ b/lasso/Attic/protocols/authn_response.c @@ -235,6 +235,31 @@ lasso_authn_response_new_from_dump(xmlChar *buffer) } LassoNode* +lasso_authn_response_new_from_export(xmlChar *buffer, + gint type) +{ + xmlChar *buffer_decoded = xmlMalloc(strlen(buffer)); + LassoNode *response, *node; + xmlNodePtr xmlNode_response; + + g_return_val_if_fail(buffer != NULL, NULL); + + xmlSecBase64Decode(buffer, buffer_decoded, strlen(buffer)); + + response = LASSO_NODE(g_object_new(LASSO_TYPE_AUTHN_RESPONSE, NULL)); + + node = lasso_node_new_from_dump(buffer_decoded); + xmlNode_response = xmlCopyNode(LASSO_NODE_GET_CLASS(node)->get_xmlNode(node), 1); + LASSO_NODE_GET_CLASS(response)->set_xmlNode(response, xmlNode_response); + + LASSO_AUTHN_RESPONSE(response)->request = NULL; + LASSO_AUTHN_RESPONSE(response)->query = NULL; + g_object_unref(node); + + return (response); +} + +LassoNode* lasso_authn_response_new_from_request_query(gchar *query, const xmlChar *providerID) { diff --git a/lasso/Attic/protocols/authn_response.h b/lasso/Attic/protocols/authn_response.h index 107c86e7..221a1451 100644 --- a/lasso/Attic/protocols/authn_response.h +++ b/lasso/Attic/protocols/authn_response.h @@ -59,6 +59,9 @@ LASSO_EXPORT GType lasso_authn_response_get_type (void LASSO_EXPORT LassoNode* lasso_authn_response_new_from_dump (xmlChar *buffer); +LASSO_EXPORT LassoNode* lasso_authn_response_new_from_export (xmlChar *buffer, + gint type); + LASSO_EXPORT LassoNode* lasso_authn_response_new_from_request_query (gchar *query, const xmlChar *providerID); |