Created
November 21, 2008 22:42
-
-
Save paul/27674 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/merb-auth/merb-auth-core/lib/merb-auth-core/authenticated_helper.rb b/merb-auth/merb-auth-core/lib/merb-auth-core/authenticated_helper.rb | |
index 24a39d4..b649d94 100644 | |
--- a/merb-auth/merb-auth-core/lib/merb-auth-core/authenticated_helper.rb | |
+++ b/merb-auth/merb-auth-core/lib/merb-auth-core/authenticated_helper.rb | |
@@ -31,8 +31,8 @@ module Merb | |
def ensure_authenticated(*strategies) | |
session.authenticate!(request, params, *strategies) unless session.authenticated? | |
auth = session.authentication | |
+ self.headers.merge!(auth.headers) | |
if auth.halted? | |
- self.headers.merge!(auth.headers) | |
self.status = auth.status | |
throw :halt, auth.body | |
end | |
diff --git a/merb-auth/merb-auth-core/lib/merb-auth-core/authentication.rb b/merb-auth/merb-auth-core/lib/merb-auth-core/authentication.rb | |
index ec15cd0..3e19fbe 100644 | |
--- a/merb-auth/merb-auth-core/lib/merb-auth-core/authentication.rb | |
+++ b/merb-auth/merb-auth-core/lib/merb-auth-core/authentication.rb | |
@@ -91,6 +91,7 @@ module Merb | |
unless s.abstract? | |
strategy = s.new(request, params) | |
user = strategy.run! | |
+ self.headers.merge!(strategy.headers) | |
if strategy.halted? | |
self.headers, self.status, self.body = [strategy.headers, strategy.status, strategy.body] | |
halt! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment