Commit Graph

15 Commits

Author SHA1 Message Date
José Valim
6a6fc4e1db Remove deprecations from Active Support. 2011-12-20 15:18:42 +01:00
Willem van Bergen
6d520803ee Test deprecation warning when not using an options hash as second parameter. 2011-09-15 15:51:30 -04:00
Willem van Bergen
41fea03342 Use an options hash to specify digest/cipher algorithm and a serializer for MessageVerifier and MessageEncryptor. 2011-09-15 14:27:12 -04:00
Willem van Bergen
db040cdf8b Implement API suggestions of pull request. 2011-09-15 13:15:21 -04:00
Willem van Bergen
a8aaef6762 Fixed tests so that they will also run properly in other timezones. 2011-09-15 09:50:39 -04:00
Willem van Bergen
bffaa888ac Custom serializers and deserializers in MessageVerifier and MessageEncryptor.
By default, these classes use Marshal for serializing and deserializing messages. Unfortunately, the Marshal format is closely associated with Ruby internals and even changes between different interpreters. This makes the resulting message very hard to impossible to unserialize messages generated by these classes in other environments like node.js.

This patch solves this by allowing you to set your own custom serializer and deserializer lambda functions. By default, it still uses Marshal to be backwards compatible.
2011-09-15 08:28:53 -04:00
Jeremy Kemper
41e7c68d87 Ruby 1.9.2: marshaling round-trips Time#zone 2010-03-28 22:52:08 -07:00
Jeremy Kemper
bc1538e995 Repair time dependencies 2009-11-14 11:37:06 -08:00
Pratik Naik
69aa5e8a86 Ensure MessageVerifier raises appropriate exception on tampered data 2009-10-09 02:26:18 +01:00
Jeffrey Hardy
9212138ad0 MessageVerifier#verify raises InvalidSignature if the signature is blank
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-10-05 13:38:26 -07:00
Jeremy Kemper
a6a0904fcb Nah, test SHA1, but skip the test and whine if OpenSSL is borked up 2009-09-24 23:13:56 -07:00
Jeremy Kemper
55f132ab82 Test with MD5 digest in an attempt to mollify CI 2009-09-24 23:10:05 -07:00
Jeremy Kemper
1c36172c13 Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.
[#1617 state:resolved]
2009-03-08 13:11:58 -07:00
Michael Koziarski
f9b1aa7f4c Don't need _message as it's in the class name already 2008-11-23 16:33:56 +01:00
Michael Koziarski
d460c9a255 Add ActiveSupport::MessageVerifier to aid users who need to store tamper-proof messages in cookies etc.
This is particularly useful for things like remember-me tokens in web applications and auto-unsubscribe links in emails.
2008-11-23 15:33:59 +01:00