diff options
author | Azul <azul@leap.se> | 2012-11-22 13:05:32 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-11-22 13:05:32 +0100 |
commit | 6d5f8d0f993093b51d1f11bb528c535dcf88a969 (patch) | |
tree | 6664d69537dae7c1a9a60972a1ce2e3dc9e43031 /users/lib/warden | |
parent | cec9ad7c514f2f3c767bd12bfc3df28db4d1a98b (diff) |
beautify login workflow
* translating error messages
* not caching login and password in js anymore
* catching non responses
Diffstat (limited to 'users/lib/warden')
-rw-r--r-- | users/lib/warden/strategies/secure_remote_password.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/users/lib/warden/strategies/secure_remote_password.rb b/users/lib/warden/strategies/secure_remote_password.rb index 8266e2d..95570e0 100644 --- a/users/lib/warden/strategies/secure_remote_password.rb +++ b/users/lib/warden/strategies/secure_remote_password.rb @@ -26,7 +26,7 @@ module Warden def validate! user = session[:handshake].authenticate(params['client_auth'].hex) - user ? success!(user) : fail!(:password => "Could not log in") + user ? success!(user) : fail!(:password => "wrong_password") end def initialize! @@ -34,7 +34,7 @@ module Warden session[:handshake] = user.initialize_auth(params['A'].hex) custom! json_response(session[:handshake]) rescue RECORD_NOT_FOUND - fail! :login => "User not found!" + fail! :login => "user_not_found" end def json_response(object) |