summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-07-13 16:54:26 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-07-13 16:54:26 +0000
commit2408d51eb8667330554c760f7d83c35389423b70 (patch)
tree64fb4d122ead0102e45f1b80de6d8115eb289480
parent3232b13ee1e96d85be5e4ed786bda16ba722e503 (diff)
downloadlasso-2408d51eb8667330554c760f7d83c35389423b70.tar.gz
lasso-2408d51eb8667330554c760f7d83c35389423b70.tar.xz
lasso-2408d51eb8667330554c760f7d83c35389423b70.zip
*** empty log message ***
-rw-r--r--lasso/id-ff/login.c12
-rw-r--r--lasso/xml/xml.c12
2 files changed, 13 insertions, 11 deletions
diff --git a/lasso/id-ff/login.c b/lasso/id-ff/login.c
index 60a412f9..873f0273 100644
--- a/lasso/id-ff/login.c
+++ b/lasso/id-ff/login.c
@@ -92,6 +92,7 @@ lasso_login_add_response_assertion(LassoLogin *login,
xmlChar *ni, *idp_ni;
providerID = lasso_provider_get_providerID(LASSO_PROVIDER(LASSO_PROFILE_CONTEXT(login)->server));
+ printf("ProviderID = %s\n", providerID);
assertion = lasso_assertion_new(providerID,
lasso_node_get_attr_value(LASSO_NODE(LASSO_PROFILE_CONTEXT(login)->request), "RequestID"));
xmlFree(providerID);
@@ -110,8 +111,12 @@ lasso_login_add_response_assertion(LassoLogin *login,
login->nameIdentifier = ni;
xmlFree(idp_ni);
}
+ printf("Start add_authenticationStatement 0x%x, 0x%x\n", assertion, authentication_statement);
+ printf("%s\n", lasso_node_export(assertion));
+ printf("%s\n", lasso_node_export(authentication_statement));
lasso_saml_assertion_add_authenticationStatement(LASSO_SAML_ASSERTION(assertion),
LASSO_SAML_AUTHENTICATION_STATEMENT(authentication_statement));
+ printf("Finish add_authenticationStatement\n");
lasso_saml_assertion_set_signature(LASSO_SAML_ASSERTION(assertion),
LASSO_PROFILE_CONTEXT(login)->server->signature_method,
LASSO_PROFILE_CONTEXT(login)->server->private_key,
@@ -151,6 +156,8 @@ lasso_login_build_artifact_msg(LassoLogin *login,
identity = lasso_user_get_identity(LASSO_PROFILE_CONTEXT(login)->user,
LASSO_PROFILE_CONTEXT(login)->remote_providerID);
+ printf(DEBUG, "ProviderID -> %s\n", lasso_provider_get_providerID(LASSO_PROVIDER(LASSO_PROFILE_CONTEXT(login)->server)));
+
/* fill the response with the assertion */
if (identity != NULL && authentication_result == 1) {
printf("DEBUG - an identity found, so build an assertion\n");
@@ -205,6 +212,7 @@ lasso_login_build_artifact_msg(LassoLogin *login,
}
break;
}
+ login->assertionArtifact = g_strdup(b64_samlArt);
xmlFree(url);
xmlFree(b64_samlArt);
xmlFree(relayState);
@@ -228,7 +236,7 @@ lasso_login_build_authn_request_msg(LassoLogin *login)
/* get SingleSignOnServiceURL metadata */
url = lasso_provider_get_singleSignOnServiceURL(remote_provider);
if (url == NULL) {
- debug(ERROR, "The element 'SingleSignOnServiceURL' is missing in metadata of remote provider");
+ debug(ERROR, "The element 'SingleSignOnServiceURL' is missing in metadata of remote provider\n");
return (-1);
}
@@ -239,7 +247,7 @@ lasso_login_build_authn_request_msg(LassoLogin *login)
LASSO_PROFILE_CONTEXT(login)->server->signature_method,
LASSO_PROFILE_CONTEXT(login)->server->private_key);
if (query == NULL) {
- debug(ERROR, "Signature failed");
+ debug(ERROR, "Query signature failed\n");
return (-2);
}
}
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c
index 857fede5..4ee3dd65 100644
--- a/lasso/xml/xml.c
+++ b/lasso/xml/xml.c
@@ -669,7 +669,6 @@ lasso_node_impl_get_attr(LassoNode *node,
prop = node->private->node->properties;
while (prop != NULL) {
- //debug(ERROR, "%s - %s\n", prop->name, name);
if (xmlStrEqual(prop->name, name)) {
return (prop);
}
@@ -688,12 +687,7 @@ lasso_node_impl_get_attr_value(LassoNode *node,
g_return_val_if_fail (LASSO_IS_NODE(node), NULL);
g_return_val_if_fail (name != NULL, NULL);
- prop = lasso_node_get_attr(node, name);
- if (prop == NULL) {
- return(NULL);
- }
-
- return (prop->children->content);
+ return (xmlGetProp(node->private->node, name));
}
static GPtrArray *
@@ -1268,7 +1262,7 @@ lasso_node_dispose(LassoNode *node)
}
node->private->dispose_has_run = TRUE;
- debug(INFO, "%s 0x%x disposed ...\n", lasso_node_get_name(node), node);
+ debug(DEBUG, "%s 0x%x disposed ...\n", lasso_node_get_name(node), node);
/* unref reference counted objects */
/* we don't have any here */
@@ -1279,7 +1273,7 @@ lasso_node_dispose(LassoNode *node)
static void
lasso_node_finalize(LassoNode *node)
{
- debug(INFO, "%s 0x%x finalized ...\n", lasso_node_get_name(node), node);
+ debug(DEBUG, "%s 0x%x finalized ...\n", lasso_node_get_name(node), node);
if (node->private->node_is_weak_ref == FALSE) {
xmlUnlinkNode(node->private->node);