diff options
Diffstat (limited to 'users')
-rw-r--r-- | users/app/controllers/sessions_controller.rb | 2 | ||||
-rw-r--r-- | users/config/initializers/warden.rb | 5 | ||||
-rw-r--r-- | users/test/integration/api/account_flow_test.rb | 1 |
3 files changed, 3 insertions, 5 deletions
diff --git a/users/app/controllers/sessions_controller.rb b/users/app/controllers/sessions_controller.rb index 72e2892..486f67e 100644 --- a/users/app/controllers/sessions_controller.rb +++ b/users/app/controllers/sessions_controller.rb @@ -11,8 +11,8 @@ class SessionsController < ApplicationController end def update - debugger authenticate! + render :json => session.delete(:handshake) end def destroy diff --git a/users/config/initializers/warden.rb b/users/config/initializers/warden.rb index 82753ec..11b950f 100644 --- a/users/config/initializers/warden.rb +++ b/users/config/initializers/warden.rb @@ -13,7 +13,7 @@ class Warden::SessionSerializer def deserialize(keys) klass, id = keys - klass.find(id) + klass.constantize.find(id) end end @@ -42,8 +42,7 @@ Warden::Strategies.add(:secure_remote_password) do end def validate! - srp_session = session.delete(:handshake) - user = srp_session.authenticate(params['client_auth'].hex) + user = session[:handshake].authenticate(params['client_auth'].hex) user ? success!(user) : fail!(:password => "Could not log in") end diff --git a/users/test/integration/api/account_flow_test.rb b/users/test/integration/api/account_flow_test.rb index 4dcca24..c9a7109 100644 --- a/users/test/integration/api/account_flow_test.rb +++ b/users/test/integration/api/account_flow_test.rb @@ -29,7 +29,6 @@ class AccountFlowTest < ActiveSupport::TestCase end def validate(m) - debugger put "/sessions/" + @login + '.json', :client_auth => m.to_s(16), :format => :json assert last_response.successful? return JSON.parse(last_response.body) |