diff options
author | Azul <azul@leap.se> | 2012-10-02 15:45:43 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-10-02 15:45:43 +0200 |
commit | c7d473882a01981ff6ff8f0e2b5c120a0026a531 (patch) | |
tree | b0889c131f8aeb4db9c265d9c34f5635421f2ee0 /users | |
parent | c76718932382e6851e1ad9f004246bde3fc74de8 (diff) |
send salt on initializing login
Diffstat (limited to 'users')
-rw-r--r-- | users/app/controllers/sessions_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/users/app/controllers/sessions_controller.rb b/users/app/controllers/sessions_controller.rb index e68d798..f79b069 100644 --- a/users/app/controllers/sessions_controller.rb +++ b/users/app/controllers/sessions_controller.rb @@ -8,7 +8,8 @@ class SessionsController < ApplicationController def create @user = User.find_by_param(params[:login]) session[:handshake] = @user.initialize_auth(params['A'].hex) - render :json => { :B => session[:handshake].bb.to_s(16) } + render :json => { :B => session[:handshake].bb.to_s(16), + :salt => @user.password_salt } rescue RECORD_NOT_FOUND render :json => {:errors => {:login => ["unknown user"]}} end |