Rodrigo Flores
9e7ab38bce
sign_out helper uses the new warden api
2012-02-16 14:53:10 -02:00
José Valim
fb8e093389
Accept devise_i18n_options to handle custom i18n values, closes #1633
2012-02-15 16:58:23 +01:00
José Valim
d9df632671
Get rid of InternalHelpers, refactor scoped views for more performant behavior.
2012-01-02 22:01:28 +01:00
José Valim
bd27bf7677
Deprecate and disable old behavior accumulated with time.
2011-12-04 23:58:19 +01:00
José Valim
1e37e42239
Do not use stored location for sign out.
2011-11-20 19:19:41 +00:00
Hinrik Örn Sigurðsson
9ea7249368
Allow specifying a resource_return_to for sign out
...
It was impossible to accomplish this by providing a
custom #after_sign_out_path_for in ApplicationController because the
session gets destroyed before it is called. Furthermore,
resource_return_to is now used by default if it exists, so users won't
have to provide a custom #after_sign_out_path_for in that case.
2011-11-13 20:27:08 +00:00
José Valim
16208f7ad7
Rework previous commit to clean up the instance variable dynamically.
2011-11-09 17:00:42 -02:00
artemk
c3880e52e4
#1432 current_user still returning user after sign_out
2011-11-09 20:35:19 +02:00
José Valim
1bace6df4e
Be sure to expire cached devise data after sign in, closes #1411
2011-11-05 20:11:09 -02:00
José Valim
fac02b58bc
Another attempt to fix the misterious loading helpers bug.
2011-10-18 08:35:50 +02:00
José Valim
990dcc8eef
Try to fix the misterious case where some url helpers are not defined.
2011-10-09 11:50:48 +02:00
José Valim
59f2767345
Remove deprecated code and tests.
2011-09-29 13:11:12 +02:00
José Valim
98acc84111
Allow options to be passed to authenticate_user!
2011-09-14 16:52:28 -07:00
Aditya Sanghi
873e49ab66
sign_in should return true in case user is already signed in and assert that.
2011-08-02 14:35:46 +05:30
José Valim
77d6d1e8c2
Do not try to authenticate with no_input_strategies are empty.
2011-06-22 15:28:49 -03:00
José Valim
4fd866d113
User cannot access sign up and similar pages if he is already signed in through a cookie or token, closes #1036 .
2011-04-29 08:56:57 +02:00
José Valim
c6dd846718
Move the catch to the test level.
2011-04-17 19:37:19 +02:00
Jack Dempsey
567d59e48a
update verbiage to be more concise
2011-04-16 19:16:33 +08:00
Jack Dempsey
f89f71262d
require_no_authentication now sets flash with I18n message
2011-04-16 19:16:33 +08:00
José Valim
c608fbe89e
Rollback to require 'test_helper'. If you want to run it in isolation, do ruby -Itest path/to/test/file.
2011-04-15 10:48:44 +02:00
John Wilger
e4af6adaf7
Added test showing previously incorrect behavior of Devise::SessionsController#create
2011-04-15 16:37:15 +08:00
Prem Sichanugrist
b6652abc7c
Add navigational_formats internal helper which filters out wildcard
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-03-30 13:43:57 +02:00
José Valim
dd721f1857
Use secure compare as well.
2011-02-15 11:33:54 +01:00
Jo Liss
692f7b27ff
typos (remaining instances of authenticable -> authenticatable)
2011-01-13 13:02:17 +08:00
Prem Sichanugrist
e8e3df3891
Add support for non-navigational format response to SessionsController
...
This will make Devise::SessionsController return the authenticated object in the requested format instead of redirect the client to another page upon success authentication.
2010-12-25 17:57:15 +08:00
José Valim
13e8bc22e3
Move duplicate sign_in logic to sign_in().
2010-12-20 10:02:27 +01:00
Gavin Hughes
fe5ef25614
Deprecate anybody_signed_in? in favor of signed_in?(nil)
2010-11-28 00:09:23 +08:00
Carlos Antonio da Silva
ed30114bd8
Fix changelog e cleanup white spaces
2010-11-21 11:25:37 -02:00
Steve Ross
4a8f9a9ba8
set_flash_message: Added conditional to make certain flash entries are not set if message is blank.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-11-20 21:42:25 +01:00
José Valim
b2496d1bc1
Smallish updates.
2010-11-11 13:53:52 +01:00
José Valim
e4c5158851
Sign out by default will destroy the existing session.
2010-10-10 17:51:32 +02:00
José Valim
db1ce8eeb2
Sign up now check if the user is active or not and redirect him accordingly setting the inactive_signed_up message. This commit also moves after_update_path_for to inside RegistrationsController, not allowing it to be overriden inside ApplicationController anymore.
2010-09-30 09:12:00 +02:00
José Valim
617e142e34
Store the salt in session and expire the session if the user changes his password
2010-09-25 17:24:56 +02:00
José Valim
617b95fdcd
sign_out_all_scopes is true by default.
2010-08-23 09:18:39 -03:00
José Valim
731650a0f1
after_sign_in_path_for always receives a resource
2010-08-23 08:56:10 -03:00
Carlos Antonio da Silva
81c49c69df
Fix failing helper test and test descriptions
2010-08-13 09:02:51 -03:00
Carlos Antonio da Silva
01c272c692
Add some tests to helper creation using namespaces, to better show how it works.
2010-08-02 08:52:12 -03:00
José Valim
fefbf51c79
scope_signed_in? helpers now simply delegate to current_scope to improve performance.
2010-07-26 20:33:23 +02:00
José Valim
4ac6b6e407
Unit tests for OAuth.
2010-07-26 20:33:23 +02:00
José Valim
00c6f583e2
More OAuth tests.
2010-07-26 20:33:22 +02:00
José Valim
adba4e2262
Register cancel route so a shortcut is created.
2010-07-26 20:33:22 +02:00
José Valim
ae6322efb5
No longer retrieve the user from paths, but use the env hash. This change deprecates use_default_scope.
...
If you have non conventional routes and want to specify the scope for a controller, you can do that at the router level:
as :user do
get "/sign_in", :to => "devise/session#new"
end
This is saying: when accessing "/sign_in", devise should use the user scope. Meaning that users signed through that form will be signed to the user scope.
2010-07-06 01:33:32 +02:00
José Valim
7a1adbb61e
Improve integration of devise with new router scope.
2010-07-04 11:53:12 +02:00
Denis Lifanov
819db39263
simplification (sign_out_everybody => sign_out_all_scopes)
2010-06-25 02:29:48 +08:00
Denis Lifanov
1924a915a8
sign_out_everybody helper (as a convenient proxy to warden)
2010-06-25 02:29:41 +08:00
SSDany
5c9fe5e769
anybody_signed_in? helper
2010-06-12 05:11:03 +08:00
Joseph DelCioppio
80977c6dee
Added after_update_path to registrations controller. Users can now specify the path that their app should return to after updated a resource. If not specified it will return to the root, or the resource's root if specified.
2010-05-25 04:25:32 +08:00
José Valim
23e608e27b
No need to append ?unauthenticated=true in URLs anymore since Flash was moved to a middleware in Rails 3.
2010-04-03 11:43:31 +02:00
José Valim
2b5a068246
Move part of the logic in SessionsController#create to the FailureApp. Whenever Warden is invoked with a :recall, the failure app will recall the chosen controller and the action given to recall.
2010-04-01 17:30:55 +02:00
José Valim
ca4e09390e
Compatibility with Ruby 1.9.1 and 1.9.2.
2010-03-26 11:27:19 +01:00