summaryrefslogtreecommitdiff
path: root/users/config/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'users/config/initializers')
-rw-r--r--users/config/initializers/warden.rb5
1 files changed, 2 insertions, 3 deletions
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