diff options
author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-10-01 22:52:42 +0000 |
---|---|---|
committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-10-01 22:52:42 +0000 |
commit | 3c58ea4fefe6c2afc06fcf10a711ec95369bfd8a (patch) | |
tree | 7be97ff47b0877526a1a50812f0a3d5e0f171455 /lasso | |
parent | 760fb469e06f2da97e16279e0bb277f12fb686bc (diff) | |
download | lasso-3c58ea4fefe6c2afc06fcf10a711ec95369bfd8a.tar.gz lasso-3c58ea4fefe6c2afc06fcf10a711ec95369bfd8a.tar.xz lasso-3c58ea4fefe6c2afc06fcf10a711ec95369bfd8a.zip |
Modified lasso_login_process_without_authn_request_msg()
The 'remote_providerID' param is now optional (can be NULL).
Diffstat (limited to 'lasso')
-rw-r--r-- | lasso/id-ff/login.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lasso/id-ff/login.c b/lasso/id-ff/login.c index 64c6d39b..e554e300 100644 --- a/lasso/id-ff/login.c +++ b/lasso/id-ff/login.c @@ -1386,10 +1386,11 @@ lasso_login_process_without_authn_request_msg(LassoLogin *login, const gchar *relayState) { LassoNode *request; + gchar *first_providerID; gint ret = 0; g_return_val_if_fail(LASSO_IS_LOGIN(login), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ); - g_return_val_if_fail(remote_providerID != NULL, LASSO_PARAM_ERROR_INVALID_VALUE); + /* if remote_providerID is NULL, get first providerID in session */ /* relayState can be NULL */ /* build a fake/dummy lib:AuthnRequest */ @@ -1406,9 +1407,16 @@ lasso_login_process_without_authn_request_msg(LassoLogin *login, relayState); } LASSO_PROFILE(login)->request = request; - LASSO_PROFILE(login)->request_type = lassoMessageTypeAuthnRequest; - LASSO_PROFILE(login)->remote_providerID = g_strdup(remote_providerID); + + if (remote_providerID == NULL) { + first_providerID = lasso_session_get_first_providerID(LASSO_PROFILE(login)->session); + LASSO_PROFILE(login)->remote_providerID = first_providerID; + } + else { + LASSO_PROFILE(login)->remote_providerID = g_strdup(remote_providerID); + } + login->protocolProfile = lassoLoginProtocolProfileBrwsArt; return ret; |