diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2005-01-21 17:58:13 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2005-01-21 17:58:13 +0000 |
| commit | ec33b6d7c6eb5744e91050e6a65e0c078acd257e (patch) | |
| tree | 5e141b3d7542e72f5e1b761e8204e3cdbe4c61b8 | |
| parent | d1f422c55d3b00a8438e3088e684ee6434784b14 (diff) | |
moved samlp qname conversion to lib_status_response
| -rw-r--r-- | lasso/xml/lib_status_response.c | 11 | ||||
| -rw-r--r-- | lasso/xml/samlp_status_code.c | 18 |
2 files changed, 11 insertions, 18 deletions
diff --git a/lasso/xml/lib_status_response.c b/lasso/xml/lib_status_response.c index 6a75b2da..883a52ca 100644 --- a/lasso/xml/lib_status_response.c +++ b/lasso/xml/lib_status_response.c @@ -96,6 +96,17 @@ init_from_query(LassoNode *node, char **query_fields) if (response->ProviderID == NULL || response->Status == NULL) return FALSE; + if (response->Status->StatusCode) { + LassoSamlpStatusCode *code = response->Status->StatusCode; + if (code->Value && strchr(code->Value, ':') == NULL) { + char *s; /* if not a QName; add the samlp prefix */ + s = g_strdup_printf("samlp:%s", code->Value); + g_free(code->Value); + code->Value = s; + } + } + + return TRUE; } diff --git a/lasso/xml/samlp_status_code.c b/lasso/xml/samlp_status_code.c index 1952f37b..f2d8d9fb 100644 --- a/lasso/xml/samlp_status_code.c +++ b/lasso/xml/samlp_status_code.c @@ -47,23 +47,6 @@ static struct XmlSnippet schema_snippets[] = { { NULL, 0, 0} }; -static gboolean -init_from_query(LassoNode *node, char **query_fields) -{ - LassoSamlpStatusCode *code = LASSO_SAMLP_STATUS_CODE(node); - gboolean rc; - - rc = lasso_node_init_from_query_fields(node, query_fields); - if (code->Value && strchr(code->Value, ':') == NULL) { - char *s; /* if not a QName; add the samlp prefix */ - s = g_strdup_printf("samlp:%s", code->Value); - g_free(code->Value); - code->Value = s; - } - - return rc; -} - /*****************************************************************************/ /* instance and class init functions */ /*****************************************************************************/ @@ -80,7 +63,6 @@ class_init(LassoSamlpStatusCodeClass *klass) LassoNodeClass *nclass = LASSO_NODE_CLASS(klass); nclass->node_data = g_new0(LassoNodeClassData, 1); - nclass->init_from_query = init_from_query; lasso_node_class_set_nodename(nclass, "StatusCode"); lasso_node_class_set_ns(nclass, LASSO_SAML_PROTOCOL_HREF, LASSO_SAML_PROTOCOL_PREFIX); lasso_node_class_add_snippets(nclass, schema_snippets); |
