[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.
This commit is contained in:
parent
908d4288a0
commit
2ab81b8e6f
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue