Étienne Barrié
882dd70a9f
Use a dedicated ActiveSupport::Deprecation
...
Rails 7.1 will deprecate using the singleton ActiveSupport::Deprecation
instance. This defines one for the gem and uses it.
2023-04-07 00:15:10 +02:00
Carlos Antonio da Silva
4f849f4fa9
Bring back `Devise.activerecord51? and deprecate it
...
Even though this is considered an internal / non-public / nodoc method,
it seems some libraries relied on it internally, causing some breakage.
Known libraries so far are `devise-security` and
`devise-pwned_password`.
Closes #5580
2023-04-03 09:21:56 -03:00
tabakazu
8acbdd6d93
Replace matcher refute to assert_not
2023-03-02 18:38:04 -03:00
Rafael Mendonça França
54fb582269
Officially support Rails 6.0
...
Also remove upper bound on railties so people can try devise with new
versions without having to wait us to change the gem and report bugs.
2019-06-12 16:10:13 -04:00
Pat Allan
f39c6fd927
Add the frozen_string_literal pragma comment to all Ruby files. ( #4725 )
2017-12-21 15:36:29 -02:00
Lucas Mazza
656720583f
Remove assert_nothing_raised deprecated usage.
2016-06-27 16:48:12 -03:00
Lucas Mazza
536279b05b
Replace homemade assert_not matcher in favor of refute.
2016-05-03 13:57:10 -03:00
Ulisses Almeida
1ddca80cee
Set the new default of sign_out_via config
2016-05-01 12:44:40 -03:00
Ulisses Almeida
896521be73
Se the new default for skip_session_storage config
2016-05-01 12:44:40 -03:00
Ulisses Almeida
6e419ce821
Set the new default for reconfirmable config
2016-05-01 12:44:40 -03:00
Ulisses Almeida
93df02f601
Set the new default for strip_whitespace_keys config
2016-05-01 12:44:40 -03:00
kimgb
830d3e86ee
updated email_regexp and added test cases ( #4001 )
...
Add a more permissive default e-mail regex.
2016-04-26 11:13:07 -03:00
Ulisses Almeida
164134c78a
Add warning about default config change
...
This change add warnings for these configurations:
* strip_whitespace_keys - It is already explicit on config template, now
it will be the same of the template.
* email_regexp - In the new version this regexp will be more
permissive.
* reconfirmable - It is already explicit on config template, now
it will be the same of the template.
* skip_session_storage - It is already explicit on config template, now
it will be the same of the template.
* sign_out_via - It is already explicit on config template, now
it will be the same of the template.
These ones is important to change, since the configuration says current
explicit value are the default. It can lead to misunderstanging if users
remove the explicit configuration.
It also updates the template explicit values:
* Warns the `config.mailer_sender` is nil by default
* Update `config.password_length` to use the current default
* Make the e-mail configuration explicit
2016-04-15 20:31:54 -03:00
Sean Marzug-McCarthy
d49533bedc
Fix default email_regexp config to disallow trailing non-word characters
2015-06-22 15:41:49 +02:00
Magnus von Koeller
a8769933d1
Split out BCrypt hashing to make it reusable
...
This logic is generic and reusable -- hash a secret; and take an
unhashed secret and compare it to a hashed secret. This breaks this out
to make it reusable in other places. Specifically, we use this in our
own token auth at Bonobos that we plan to split out as a Devise
extension. This will make that possible without copy & pasting this
code.
2015-05-06 12:11:09 -07:00
Carlos Antonio da Silva
6129215afe
Simplify test that verifies multiple warden blocks
2014-05-07 18:53:09 -03:00
Carlos Antonio da Silva
916e1d8da9
No need for instance vars on these tests
2014-05-07 18:50:50 -03:00
Ross Kaffenberger
5f32cd25fd
support multiple warden configuration blocks
...
Changes the behavior of `Devise.warden` such that calling it multiple
times with different blocks will result in a call to each block on
`Devise.configure_warden!` rather than "last block wins". This is
especially used for plugins that wish to extend warden functionality
without clobbering base app configuration or vice versa.
2014-04-15 17:20:21 -04:00
Anshul Sharma
dc1b399a8b
Updated ruby 1.9 hash syntax
2014-02-25 22:12:55 +05:30
Vasiliy Ermolovich
0d6493a9a5
proper hash comparing in Devise.bcrypt test
2013-10-06 14:19:08 +03:00
Aaron Patterson
5300bdabc8
add a class method so you can encrypt passwords from fixtures
2013-10-06 13:53:12 +03:00
Anatoliy Kukul
f0f3e15c08
add test for Devise.email_regexp
2012-11-19 17:38:22 +02:00
José Valim
930b324c15
Usage of confirm_within was deprecated in favor allow_unconfirmed_access_for
2011-12-11 20:18:02 +01:00
José Valim
4629beecd7
Cache failure_app action builder and pipe call through delegator.
2011-11-07 09:20:09 -02:00
José Valim
fa6c8ab321
Use inflector to avoid conflicts.
2011-04-16 13:30:15 +02:00
Guilherme Silveira
e4cae200f4
simplifying comparisons (avoind too much negatives) and adding unit test cases
2011-02-27 15:14:02 +08:00
José Valim
e905762611
Clean up the whole loading mess and closes #247 . This commit depends on latest Rails.
2010-05-16 00:38:40 +02:00
José Valim
3d1a04fd83
Fix warden configuration.
2010-03-31 22:04:48 +02:00
José Valim
033db1ca7c
Do not depend on silence_missing_strategies! anymore. This speeds up strategies matching because we don't need to check if the model duck types to the strategy and it doesn't trigger uneeded strategies.
2010-03-28 14:55:05 +02:00
José Valim
ca4e09390e
Compatibility with Ruby 1.9.1 and 1.9.2.
2010-03-26 11:27:19 +01:00
José Valim
038627574c
Keep modules definition in a different file.
2010-03-03 12:03:43 +01:00
José Valim
1cf4dc798d
Add Http Basic Authentication support.
2010-02-06 01:33:32 +01:00
Jonas Grimfelt
e1440fb430
Initial support for authorization using "authentication token" (a.k.a. "single access token") - new module. Corresponding changes to Devise core to hook events like "after_changed_password" (only one added now - only one that makes much sense for latest module) easily. Unit and integration tests included. NOTE: One failing test for hooking Warden::Manager.after_authentication - gets ignored for some reason.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-02-02 12:36:44 +01:00
Jonas Grimfelt
f50ec773b2
New convenient helper method for extending Devise with additional modules: Devise::add_module.
2010-01-21 16:06:17 +08:00
José Valim
f46d1b1d81
Add support to Warden 0.9.0.pre
2010-01-14 13:38:02 +01:00
José Valim
a789f08d3b
Cleaning up README to be more compatible with the latest stuff.
2010-01-05 16:01:16 +01:00
José Valim
543fe077d8
Update to work with Warden 0.8.0.
2010-01-05 13:44:13 +01:00
José Valim
1a8dc7fe37
Allow default scope to beconfigured.
2009-11-19 13:09:05 -02:00
José Valim
ffbc9c604d
Only redirect if needed.
2009-11-16 14:31:09 -02:00
José Valim
7ffd0900c1
Rely on Warden new serializers.
2009-11-15 00:13:43 -02:00
José Valim
0be7426847
Use a Rack Middleware to sign in users.
2009-11-13 19:26:33 -02:00
José Valim
0c088a7420
Renamed mail_sender to mailer_sender.
2009-11-06 09:40:38 -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
Carlos A. da Silva
984cf8ee20
Moving Devise method to Devise::ActiveRecord and updating TODO
2009-10-09 10:46:24 -03:00
Carlos A. da Silva
17d1073181
Creating acts_as_devisable method for active record to include devise. (need refactoring, maybe something different to do the job)
2009-10-09 10:37:36 -03:00