Carlos Antonio da Silva
4de1e43b7a
Fix "return_to" to always save the request_uri, overwriting the return to url when the user types another forbidden url before sign in.
...
This way the user will be redirected to the last attempted url and not the first one.
2010-02-04 08:46:22 -02:00
José Valim
3781a0f47b
Tidy up token authentication implementation.
2010-02-02 13:21:00 +01:00
Jonas Grimfelt
4878bdb60b
Second version of token_authenticatable reflecting feedback: Nuked all hook-stuff. Should be easy to custom-reset authentication tokens by inheritance.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-02-02 12:37:06 +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
José Valim
2afad49a96
Bring rememberable back.
2010-01-14 15:47:14 +01:00
José Valim
f46d1b1d81
Add support to Warden 0.9.0.pre
2010-01-14 13:38:02 +01:00
Marcelo Silveira
32991e13c4
Merge and fix conflicts.
2010-01-09 11:22:27 -02:00
José Valim
6517b358a1
sign_in_count should also be increased when user signs in via password change, confirmation, etc.
2010-01-07 22:41:14 +01:00
José Valim
4d8f5ea165
Add an easy way to configure an application to sign in users through "/sign_in".
...
First, configure your routes:
map.devise_for :users
map.sign_in "/sign_in", :controller => "sessions", :action => "new"
Then, in config/initializers/devise.rb:
config.use_default_scope = true
The default scope is always the first declaration in routes.rb, but if you need
to change it, you can also do it through the initializer:
config.default_scope = :user
2010-01-06 14:31:00 +01:00
José Valim
543fe077d8
Update to work with Warden 0.8.0.
2010-01-05 13:44:13 +01:00
Marcelo Silveira
d2fa737aa0
introducing lockable implementation
2010-01-01 17:57:35 -02:00
José Valim
35a8d13369
Tests passing for ActiveRecord and MongoMapper.
2009-12-21 21:10:23 +01:00
José Valim
c05b8cf2ce
Rename :timeout to :timeout_in and release gem again.
2009-11-25 00:11:49 -02:00
José Valim
4c7081c2e3
More Datamapper compatibility.
2009-11-24 18:02:36 -02:00
José Valim
0434d72009
Update TODO, CHANGELOG and README.
2009-11-24 15:29:46 -02:00
José Valim
f9c5dd6a79
Added trackable for sign_in_count, sign_in_at and sign_in_ip.
2009-11-24 15:18:42 -02:00
José Valim
076ce9add8
Improve timeoutable tests a bit.
2009-11-24 11:52:13 -02:00
José Valim
691055cf06
Fix timeout tests.
2009-11-24 11:00:35 -02:00
Carlos Antonio da Silva
a88731bb93
Adding i18n flash message when session is expired.
2009-11-23 23:01:01 -02:00
Carlos Antonio da Silva
fc89db636a
Refactoring tests with I18n.
2009-11-23 23:01:00 -02:00
Carlos Antonio da Silva
40aaa98de9
Refactoring timeoutable module and confirmable tests.
2009-11-23 23:01:00 -02:00
Carlos Antonio da Silva
099c77e867
Introducing timeoutable to timeout sessions without activity.
2009-11-23 23:01:00 -02:00
José Valim
415bcdc722
Added scoped views support. Just turn it on in your Devise.setup.
2009-11-21 20:07:37 -02:00
José Valim
ffbc9c604d
Only redirect if needed.
2009-11-16 14:31:09 -02:00
José Valim
b70b293690
Add authentication_keys.
2009-11-15 03:31:13 -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
4894059828
Remember token is now properly stored and specified one for each user.
2009-11-13 17:23:32 -02:00
José Valim
e6901686c4
Authentication fail with user cannot be serialized from session [ #29 ]
2009-11-10 00:00:40 -02:00
José Valim
1db50dee36
Skip authentication filters by default on Devise controllers and add devise_controller? to select/reject other filters.
2009-11-06 09:33:18 -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
e7f809de3c
Do not require ActiveRecord to be loaded to use Devise.
2009-10-30 21:51:50 -02:00
José Valim
b28d7e8b1c
Renamed authenticable to authenticatable and added deprecation warnings.
2009-10-30 08:29:10 -02:00
José Valim
3209e7d988
Renamed confirm_in to confirm_within.
2009-10-30 07:23:47 -02:00
José Valim
5172d50b95
Ensure fail! works inside strategies, create unauthenticated and invalid messages and do not redirect on invalid authentication.
2009-10-29 08:29:31 -02:00
Carlos A. da Silva
11e4ee112b
Adding Failure module to redirect the user when unauthenticated or unconfirmed, based on warden 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
bbca9e830e
Verify confirmation time frame to let the user sign in or block it if the user is not confirmed.
2009-10-22 20:18:16 -02:00
Carlos A. da Silva
28a7f78fba
Creating rememberable module.
2009-10-20 00:31:33 -02:00
José Valim
9feb9455ce
Allow page after sign in to be configured.
2009-10-18 15:25:16 -02:00
José Valim
609a83a76c
Allow to access the session for a given scope, through #{scope}_session reader and improved documentation.
2009-10-18 12:54:21 -02:00
Carlos A. da Silva
f1bb64fb1e
Update flash messages to show signed in automatically info.
2009-10-18 10:39:22 -02:00
Carlos A. da Silva
8d85db3b57
Sign user in automatically after confirming or changing it's password
2009-10-18 10:36:20 -02:00
Carlos A. da Silva
29ea916e9f
Fix clearing reset password token while reseting password.
2009-10-18 09:54:53 -02:00
Carlos A. da Silva
75e98d3041
Separating perishable token into confirmation and reset_password tokens. Adding confirmation_sent_at attribute.
2009-10-18 09:14:52 -02:00
Carlos A. da Silva
a5cb147eb2
Stores the requested page before signing in and redirect the user to the stored uri after.
2009-10-17 11:12:50 -03:00
Carlos A. da Silva
0f174dbf4b
Updating routes to use sign_in/sign_out instead of session.
2009-10-16 13:44:51 -03:00
Carlos A. da Silva
3700e9979c
Clearing perishable token when confirming or reseting password.
2009-10-15 17:36:44 -03:00
Carlos A. da Silva
e8611609ac
Send confirmation instructions only works if the record is not confirmed.
2009-10-15 16:54:04 -03:00
José Valim
6da49499ff
Finished major changes.
2009-10-12 10:18:14 -03:00