diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-12-17 17:40:07 +0100 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-12-17 17:40:07 +0100 |
commit | 8c289263043f6f3ed0ae17485658a4387964c961 (patch) | |
tree | 52c421715ba07ac7e37a1cc6796e6de54b6da2da /lasso | |
parent | d02bf096a5468ce688b07ecb543260942c075331 (diff) | |
download | lasso-8c289263043f6f3ed0ae17485658a4387964c961.tar.gz lasso-8c289263043f6f3ed0ae17485658a4387964c961.tar.xz lasso-8c289263043f6f3ed0ae17485658a4387964c961.zip |
[profile] prefer to lookup the session before the identity for looking up a name identifier;
Diffstat (limited to 'lasso')
-rw-r--r-- | lasso/id-ff/profile.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lasso/id-ff/profile.c b/lasso/id-ff/profile.c index a0b24aa9..ee0d10f8 100644 --- a/lasso/id-ff/profile.c +++ b/lasso/id-ff/profile.c @@ -115,6 +115,20 @@ lasso_profile_get_nameIdentifier(LassoProfile *profile) if (profile->remote_providerID == NULL) return NULL; + /* For transient federations, we must look at assertions no federation object exists */ + if (LASSO_IS_SESSION(profile->session)) { + LassoNode *assertion, *name_id; + + assertion = lasso_session_get_assertion(profile->session, + profile->remote_providerID); + + name_id = _lasso_saml_assertion_get_name_id((LassoSamlAssertion*)assertion); + if (name_id) + return name_id; + name_id = _lasso_saml2_assertion_get_name_id((LassoSaml2Assertion*)assertion); + if (name_id) + return name_id; + } /* beware, it is not a real loop ! */ if (LASSO_IS_IDENTITY(profile->identity)) do { remote_provider = lasso_server_get_provider(profile->server, profile->remote_providerID); @@ -136,20 +150,6 @@ lasso_profile_get_nameIdentifier(LassoProfile *profile) return federation->local_nameIdentifier; } while (FALSE); - /* For transient federations, we must look at assertions no federation object exists */ - if (LASSO_IS_SESSION(profile->session)) { - LassoNode *assertion, *name_id; - - assertion = lasso_session_get_assertion(profile->session, - profile->remote_providerID); - - name_id = _lasso_saml_assertion_get_name_id((LassoSamlAssertion*)assertion); - if (name_id) - return name_id; - name_id = _lasso_saml2_assertion_get_name_id((LassoSaml2Assertion*)assertion); - if (name_id) - return name_id; - } return NULL; } |