diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-03-27 15:05:52 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-03-27 15:05:52 +0000 |
| commit | 88eaabc94d2b534a10a88fed671413ff51301c01 (patch) | |
| tree | a35b2881f027dd8c78af087d19d4bc882bfd4090 | |
| parent | aad866ab670e56ed02a04dd6fd047b322b3d758d (diff) | |
SAML 2.0: add direct treatment of relaystate for HTTP-Redirect binding
* lasso/saml-2.0/login.c: In
lasso_saml20_login_process_authn_request_msg change handling of
relayState do not rely upon parsing by the node object, but extract
directly from the query string. Use new function
lasso_get_relaystate_from_query.
* lasso/saml-2.0/logout.c: In lasso_saml20_logout_process_request_msg
change handling of relayState do not rely upon parsing by the node
object, but extract directly from the query string.
* lasso/saml-2.0/profile.c: In
lasso_saml20_profile_init_artifact_resolve, add handling of the
relayState transmitted to the assertion consumer URL.
* lasso/saml-2.0/name_id_management.c: In
lasso_name_id_management_process_request_msg change handling of
relayState do not rely upon parsing by the node
object, but extract directly from the query string.
| -rw-r--r-- | lasso/saml-2.0/login.c | 7 | ||||
| -rw-r--r-- | lasso/saml-2.0/profile.c | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lasso/saml-2.0/login.c b/lasso/saml-2.0/login.c index 209e07c3..7d8939c1 100644 --- a/lasso/saml-2.0/login.c +++ b/lasso/saml-2.0/login.c @@ -210,12 +210,13 @@ lasso_saml20_login_process_authn_request_msg(LassoLogin *login, const char *auth format == LASSO_MESSAGE_FORMAT_ERROR) { return critical_error(LASSO_PROFILE_ERROR_INVALID_MSG); } + if (format == LASSO_MESSAGE_FORMAT_QUERY) { + lasso_assign_new_string(profile->msg_relayState, + lasso_get_relaystate_from_query(authn_request_msg)); + } } authn_request = LASSO_SAMLP2_AUTHN_REQUEST(request); - if (authn_request->relayState) { - profile->msg_relayState = g_strdup(authn_request->relayState); - } profile->request = request; profile->remote_providerID = g_strdup( diff --git a/lasso/saml-2.0/profile.c b/lasso/saml-2.0/profile.c index b9ad466d..e6e29776 100644 --- a/lasso/saml-2.0/profile.c +++ b/lasso/saml-2.0/profile.c @@ -279,6 +279,7 @@ lasso_saml20_profile_init_artifact_resolve(LassoProfile *profile, } else { request->sign_type = LASSO_SIGNATURE_TYPE_SIMPLE; } + lasso_assign_new_string(profile->msg_relayState, lasso_get_relaystate_from_query(msg)); return 0; } |
