aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-11-23 16:33:56 +0100
committerMichael Koziarski <michael@koziarski.com>2008-11-23 16:33:56 +0100
commitf9b1aa7f4c8555c92365327cd9a0c1aa5ebf1070 (patch)
tree502de77d89d8b6579d96d147f4a902df4636bb80 /activesupport/lib
parentd460c9a25560f43e7c3789abadf7b455053eb686 (diff)
downloadrails-f9b1aa7f4c8555c92365327cd9a0c1aa5ebf1070.tar.gz
rails-f9b1aa7f4c8555c92365327cd9a0c1aa5ebf1070.tar.bz2
rails-f9b1aa7f4c8555c92365327cd9a0c1aa5ebf1070.zip
Don't need _message as it's in the class name already
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/message_verifier.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/message_verifier.rb b/activesupport/lib/active_support/message_verifier.rb
index f3f905c15e..304058253c 100644
--- a/activesupport/lib/active_support/message_verifier.rb
+++ b/activesupport/lib/active_support/message_verifier.rb
@@ -6,11 +6,11 @@ module ActiveSupport
# session store isn't suitable or available.
#
# Remember Me:
- # cookies[:remember_me] = @verifier.generate_message([@user.id, 2.weeks.from_now])
+ # cookies[:remember_me] = @verifier.generate([@user.id, 2.weeks.from_now])
#
# In the authentication filter:
#
- # id, time = @verifier.verify_message(cookies[:remember_me])
+ # id, time = @verifier.verify(cookies[:remember_me])
# if time < Time.now
# self.current_user = User.find(id)
# end
@@ -23,7 +23,7 @@ module ActiveSupport
@digest = digest
end
- def verify_message(signed_message)
+ def verify(signed_message)
data, digest = signed_message.split("--")
if digest != generate_digest(data)
raise InvalidSignature
@@ -32,7 +32,7 @@ module ActiveSupport
end
end
- def generate_message(value)
+ def generate(value)
data = ActiveSupport::Base64.encode64s(Marshal.dump(value))
"#{data}--#{generate_digest(data)}"
end