summaryrefslogtreecommitdiff
path: root/users/app/controllers
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-09-23 19:55:22 +0200
committerAzul <azul@leap.se>2013-09-24 10:48:32 +0200
commit193bf6446b384dce1699e8fb82be6f16cb8cb5f6 (patch)
treefb4ed9b5a383a04c491ea0d1a54a413117028f24 /users/app/controllers
parent98db0cc42019dfcd90d58e0126fe691590fde2e2 (diff)
use token auth when accessing the api from webapp
One failing integration test still needs to be fixed
Diffstat (limited to 'users/app/controllers')
-rw-r--r--users/app/controllers/v1/sessions_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/users/app/controllers/v1/sessions_controller.rb b/users/app/controllers/v1/sessions_controller.rb
index 1b20a82..eb6c322 100644
--- a/users/app/controllers/v1/sessions_controller.rb
+++ b/users/app/controllers/v1/sessions_controller.rb
@@ -24,6 +24,7 @@ module V1
def update
authenticate!
@token = Token.create(:user_id => current_user.id)
+ session[:token] = @token.id
render :json => login_response
end