From 2ab81b8e6f7870f650e41bf183c27cdbf7b6ef84 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 25 Aug 2010 19:00:36 +0200 Subject: [PATCH] [SAMLv2] replace use of lasso_provider_get_default_name_id_format with direct use of lasso_provider_get_metadata_one_for_role The first is trying to use provider->role to know which kind of role descriptor to lookup, but for the server object this field is 0 and when building authn request we know that we want our default NameIDFormat for the SP sso descriptor. --- lasso/saml-2.0/login.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lasso/saml-2.0/login.c b/lasso/saml-2.0/login.c index e0582559..60b71d6b 100644 --- a/lasso/saml-2.0/login.c +++ b/lasso/saml-2.0/login.c @@ -91,7 +91,8 @@ lasso_saml20_login_init_authn_request(LassoLogin *login, LassoHttpMethod http_me lasso_samlp2_name_id_policy_new()); /* set name id policy format */ /* no need to check server, done in init_request */ - default_name_id_format = lasso_provider_get_default_name_id_format(&profile->server->parent); + default_name_id_format = lasso_provider_get_metadata_one_for_role(&profile->server->parent, + LASSO_PROVIDER_ROLE_SP, "NameIDFormat"); if (default_name_id_format) { /* steal the string */ lasso_assign_new_string(LASSO_SAMLP2_AUTHN_REQUEST(request)->NameIDPolicy->Format,