Lucas Mazza
fe10a5b17a
Fix test typo and expand test cases for Rememberable#rememberable_value.
...
Closes #4157
2016-06-27 17:08:52 -03:00
Ralin Chimev
9caf07dd4f
Fix overwriting the remember_token when a valid one already exists ( #4101 )
...
The remember_token should not get overwritten when a user is
signing in and a valid token already exists.
Fixes #3950 .
2016-05-15 11:48:12 -03:00
Lucas Mazza
a2498074f1
Replace custom Array assertion with assert_equal.
2016-05-03 14:18:35 -03:00
Lucas Mazza
7bff3be869
Attempt to coerce the generated_at cookie to a Time object.
...
Time objects aren't properly coerced back when using the JSON cookie serialization,
so we need to do it ourselves.
To avoid any new JSON serialization issues, we now store the `generated_at` as
an String with the timestamp seconds + miliseconds in the cookie but still the
previous JSON encoded format.
Thanks to @boblail at https://github.com/plataformatec/devise/pull/3917 for the
initial patch.
2016-01-29 18:04:16 -02:00
José Valim
d1d8c2f03d
Ensure generated_at is a Time
...
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2016-01-25 11:17:18 +01:00
José Valim
4ec7dc0f27
Store creation timestamp on remember cookies
...
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2016-01-18 15:17:25 +01:00
José Valim
fe49e625e8
Do not accept empty authentication_salt too
2015-05-26 15:04:27 +02:00
Lauro Caetano
f7fdde1ab0
Add the invalidate_all_sessions_on_logout configuration to invalidate
...
all the remember me tokens when the user signs out.
2014-04-04 16:17:26 -03:00
Anshul Sharma
dc1b399a8b
Updated ruby 1.9 hash syntax
2014-02-25 22:12:55 +05:30
José Valim
605924a921
Add a test related to remember token generation
2013-08-19 20:48:36 +02:00
Vipul A M
2e6457006e
Remove unused variables and fix typos
2013-04-18 10:24:38 +05:30
Carlos Antonio da Silva
d89dad5728
Bundle update for both Rails 3.1 and 3.2, update mocha, fix failing tests
2013-04-13 11:08:27 -03:00
José Valim
52b4bab461
Fix failing test.
2012-03-30 09:13:28 +02:00
Rodrigo Flores
faf8b01ecc
Fixing some tests and adding an assert message
2012-02-22 13:55:05 -02:00
Rodrigo Flores
d7337c5b26
Added a missing test and asserting same content for 1.8 compatibility
2012-02-22 13:55:05 -02:00
José Valim
bd27bf7677
Deprecate and disable old behavior accumulated with time.
2011-12-04 23:58:19 +01:00
Chase DuBois
89e4ab8a45
Moved check against record deletion into forget_me! method in model; added unit test.
2011-04-25 15:49:59 +08:00
José Valim
67a49f3b75
Ensure authenticatable_salt can be nil.
2010-11-11 22:51:39 +01:00
Sean Cribbs
9f032350e3
Use ActiveModel's to_key instead of id.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-10-10 17:51:32 +02:00
José Valim
09088706bb
Extract encryptors into their own module for better bcrypt support.
2010-09-25 16:08:46 +02:00
José Valim
31d821c2e0
Allow to Rememberable to work without remember_token relying on salt if possible.
...
This comes with the benefit that if you change your password, all remember tokens expires, and it also requires one field less in the database.
The downside is that if you want remember_me_across_browser to be false, it won't work unless you use the token. It also requires you to be using database_authenticable.
Using salt is now the default in Devise.
2010-09-25 13:07:24 +02:00
José Valim
1ed674afa8
Use Admin in old rememberable tests.
2010-09-25 12:04:38 +02:00
José Valim
c5999c8f61
Tests green on mongoid as well.
2010-07-26 20:25:02 +02:00
José Valim
81620fecab
More about extend remember period feature.
2010-07-23 23:57:31 +02:00
José Valim
058d433f28
Add extend_remember_period, closes #340 .
2010-07-23 16:32:22 +02:00
Trevor Turk
aefcd53765
more tests for remember_across_browsers
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-30 12:42:59 +02:00
Trevor Turk
8824b767f3
remember_across_browsers option for rememberable module
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-30 12:42:42 +02:00
Postmodern
29ba790e07
Do not use ActiveRecord only methods in tests.
2010-06-19 17:30:10 -07:00
José Valim
015c74e734
Use message verifier in cookies. Previous implementation allowed brute force attacks by cookies. Even though it is impossible for the brute force attack to succeed, the current implementation blocks the attacker even before hitting the database.
2010-03-31 13:31:45 +02:00
Jacques Crocker
e127463ac8
Adding Mongoid 2.0 Support, Removing MongoMapper for now
2010-03-26 13:37:38 -07:00
José Valim
ca4e09390e
Compatibility with Ruby 1.9.1 and 1.9.2.
2010-03-26 11:27:19 +01:00
José Valim
33941d1f62
All tests passing (except two which are errors in Rails). Now generators and initialization process.
2010-02-16 21:23:58 +01:00
José Valim
35a8d13369
Tests passing for ActiveRecord and MongoMapper.
2009-12-21 21:10:23 +01:00
José Valim
78303cd5c5
Got another bunch of tests passing with MongoMapper.
2009-12-21 19:57:17 +01:00
José Valim
30d6d37bab
Refactor tests a little bit and gain more speed (from 12s to 9s in my machine).
2009-11-24 23:19:12 -02:00
José Valim
371a9bb0d0
Major refactoring. Allow Warden::Manager to be configured through Devise, undeprecate Devise.confirm_within, Devise.pepper and friends and move Rails hooks to their own file.
2009-11-03 09:35:11 -02:00
José Valim
dc86a571ae
[DEPRECATION] Notifier is deprecated, use DeviseMailer instead. Remember to rename app/views/notifier to app/views/devise_mailer and I18n key from devise.notifier to devise.mailer.
2009-11-02 23:14:27 -02:00
José Valim
e7f809de3c
Do not require ActiveRecord to be loaded to use Devise.
2009-10-30 21:51:50 -02:00
Carlos A. da Silva
9643a5fa6d
Removing attr_accessible.
2009-10-22 20:18:16 -02:00
Carlos A. da Silva
697a17686e
Updating model_config and require confirmable hook with last changes.
2009-10-22 20:18:16 -02:00
Carlos A. da Silva
5631b8dacd
Remember the user only if the remember token has not expired.
2009-10-22 20:18:16 -02:00
Carlos A. da Silva
9720c36380
Updating tests and fix rememberable serialize_from_cookie.
2009-10-20 08:59:01 -02:00
Carlos A. da Silva
28a7f78fba
Creating rememberable module.
2009-10-20 00:31:33 -02:00