summaryrefslogtreecommitdiffstats
path: root/lib/authenticated_system.rb
diff options
context:
space:
mode:
authorMarius Mathiesen <marius.mathiesen@gmail.com>2009-03-23 10:09:13 +0100
committerJohan Sørensen <johan@johansorensen.com>2009-04-22 15:17:13 +0200
commit555ae7f3b4ccc2394e0eed60ab6cfc79c55c61d9 (patch)
treebcd2e083d9b02723bb81f5b49cb138855cf4049e /lib/authenticated_system.rb
parentc163782f63373d8e89360a701dcd8e1454659501 (diff)
downloadgitorious-mainline-outdated-555ae7f3b4ccc2394e0eed60ab6cfc79c55c61d9.zip
gitorious-mainline-outdated-555ae7f3b4ccc2394e0eed60ab6cfc79c55c61d9.tar.gz
gitorious-mainline-outdated-555ae7f3b4ccc2394e0eed60ab6cfc79c55c61d9.tar.bz2
Skipping the "magic cookie" intended for Varnishd. Will rather use headers to be picked up by Varnishd.
Added an after filter in application_controller that sets a header to be picked up by Varnishd
Diffstat (limited to 'lib/authenticated_system.rb')
-rw-r--r--lib/authenticated_system.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/authenticated_system.rb b/lib/authenticated_system.rb
index ae18f0d..9be68d1 100644
--- a/lib/authenticated_system.rb
+++ b/lib/authenticated_system.rb
@@ -15,21 +15,9 @@ module AuthenticatedSystem
# Store the given user in the session.
def current_user=(new_user)
session[:user_id] = (new_user.nil? || new_user.is_a?(Symbol)) ? nil : new_user.id
- set_varnish_auth_cookie
@current_user = new_user
end
- def set_varnish_auth_cookie
- cookies[:authenticated] = {
- :value => "true",
- :domain => ".#{GitoriousConfig['gitorious_host']}",
- :expires => 3.weeks.from_now,
- }
- end
-
- def clear_varnish_auth_cookie
- cookies.delete :authenticated, :domain => ".#{GitoriousConfig['gitorious_host']}"
- end
# Check if the user is authorized
#