diff options
author | olavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53> | 2009-08-10 12:38:08 +0000 |
---|---|---|
committer | olavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53> | 2009-08-10 12:38:08 +0000 |
commit | 6de95e8bd59caea283224155b8f43c5cf06a4417 (patch) | |
tree | da31646aed098a081f24a3bc6f439718b635e445 /auth_mellon_handler.c | |
parent | e56fed8e02c0ee5b619b8d5b5d833aa5a95c61e4 (diff) | |
download | mod_auth_mellon-6de95e8bd59caea283224155b8f43c5cf06a4417.tar.gz mod_auth_mellon-6de95e8bd59caea283224155b8f43c5cf06a4417.tar.xz mod_auth_mellon-6de95e8bd59caea283224155b8f43c5cf06a4417.zip |
Disable local session when logout starts.
Mark the local session as logged out as soon as logout starts, in case
the IdP doesn't respond for some reason.
git-svn-id: https://modmellon.googlecode.com/svn/trunk@64 a716ebb1-153a-0410-b759-cfb97c6a1b53
Diffstat (limited to 'auth_mellon_handler.c')
-rw-r--r-- | auth_mellon_handler.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/auth_mellon_handler.c b/auth_mellon_handler.c index 7f7569e..b8bc25c 100644 --- a/auth_mellon_handler.c +++ b/auth_mellon_handler.c @@ -796,6 +796,7 @@ static int am_init_logout_request(request_rec *r, LassoLogout *logout) { char *return_to; int rc; + am_cache_entry_t *mellon_session; gint res; char *redirect_to; LassoProfile *profile; @@ -813,6 +814,13 @@ static int am_init_logout_request(request_rec *r, LassoLogout *logout) return HTTP_BAD_REQUEST; } + /* Disable the the local session (in case the IdP doesn't respond). */ + mellon_session = am_get_request_session(r); + if(mellon_session != NULL) { + mellon_session->logged_in = 0; + am_release_request_session(r, mellon_session); + } + /* Create the logout request message. */ res = lasso_logout_init_request(logout, NULL, LASSO_HTTP_METHOD_REDIRECT); if(res == LASSO_PROFILE_ERROR_SESSION_NOT_FOUND) { |