summaryrefslogtreecommitdiff
path: root/users/app/controllers
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-04-02 14:20:55 +0200
committerAzul <azul@leap.se>2013-04-02 14:20:55 +0200
commit62c48c5a14ea0c1221216c3e40eb82ef594f2771 (patch)
tree374b3201989f20fa6f6b10a0a63c75cd6ff4f3db /users/app/controllers
parent869ba2f363a48d0f76321efc08a228f54aeb6758 (diff)
send salt on Session#create without srp ephemeral A
Diffstat (limited to 'users/app/controllers')
-rw-r--r--users/app/controllers/v1/sessions_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/users/app/controllers/v1/sessions_controller.rb b/users/app/controllers/v1/sessions_controller.rb
index 0551ca9..9365d76 100644
--- a/users/app/controllers/v1/sessions_controller.rb
+++ b/users/app/controllers/v1/sessions_controller.rb
@@ -13,7 +13,12 @@ module V1
def create
logout if logged_in?
- authenticate!
+ if params['A']
+ authenticate!
+ else
+ @user = User.find_by_login(params['login'])
+ render :json => {salt: @user.salt}
+ end
end
def update