summaryrefslogtreecommitdiffstats
path: root/auth_mellon_cookie.c
diff options
context:
space:
mode:
authorolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2008-11-10 18:31:14 +0000
committerolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2008-11-10 18:31:14 +0000
commit18a8e091a690e942cdc9dc12fb22502052b00998 (patch)
tree4517e3b8f3d144882b28c13bf54505e8312b44f8 /auth_mellon_cookie.c
parentc1badad9447f192da7d2c0f1c97574a448767455 (diff)
downloadmod_auth_mellon-18a8e091a690e942cdc9dc12fb22502052b00998.tar.gz
mod_auth_mellon-18a8e091a690e942cdc9dc12fb22502052b00998.tar.xz
mod_auth_mellon-18a8e091a690e942cdc9dc12fb22502052b00998.zip
Add IdP initiated SSO support.
This patch adds support for IdP initiated SSO, and also creates more resistance to DOS attacks. git-svn-id: https://modmellon.googlecode.com/svn/trunk@34 a716ebb1-153a-0410-b759-cfb97c6a1b53
Diffstat (limited to 'auth_mellon_cookie.c')
-rw-r--r--auth_mellon_cookie.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/auth_mellon_cookie.c b/auth_mellon_cookie.c
index 9bbb716..4995a06 100644
--- a/auth_mellon_cookie.c
+++ b/auth_mellon_cookie.c
@@ -63,6 +63,14 @@ const char *am_cookie_get(request_rec *r)
return NULL;
}
+ /* Check if we have added a note on the current request. */
+ value = (const char *)ap_get_module_config(r->request_config,
+ &auth_mellon_module);
+ if(value != NULL) {
+ return value;
+ }
+
+
name = am_cookie_name(r);
cookie = apr_table_get(r->headers_in, "Cookie");
@@ -149,6 +157,12 @@ void am_cookie_set(request_rec *r, const char *id)
*/
apr_table_addn(r->headers_out, "Set-Cookie", cookie);
apr_table_addn(r->err_headers_out, "Set-Cookie", cookie);
+
+ /* Add a note on the current request, to allow us to retrieve this
+ * cookie in the current request.
+ */
+ ap_set_module_config(r->request_config, &auth_mellon_module,
+ apr_pstrdup(r->pool, id));
}