diff options
Diffstat (limited to 'users/lib/warden')
-rw-r--r-- | users/lib/warden/strategies/secure_remote_password.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/users/lib/warden/strategies/secure_remote_password.rb b/users/lib/warden/strategies/secure_remote_password.rb index 2dcd706..a97e795 100644 --- a/users/lib/warden/strategies/secure_remote_password.rb +++ b/users/lib/warden/strategies/secure_remote_password.rb @@ -28,6 +28,9 @@ module Warden if client = validate success!(User.find_by_login(client.username)) else + Rails.logger.warn "Login attempt failed." + Rails.logger.debug debug_info + Rails.logger.debug "Received: #{params['client_auth']}" fail!(:base => "invalid_user_pass") end end @@ -58,6 +61,13 @@ module Warden def id params["id"] || params["login"] end + + protected + + def debug_info + JSON.pretty_generate(session[:handshake].internal_state) + end + end end Warden::Strategies.add :secure_remote_password, |