Commit 6292e7b2 authored by o's avatar o
Browse files

fix multiple relogins

parent 0125893f
......@@ -5,9 +5,9 @@ require 'jsobfu'
class LoginController < ApplicationController
CountIpFails = false
def save_login_token(res)
def save_login_token(res, user)
session[:login_token] = res['login_token']
session[:login_user] = @input_user_id
session[:login_user] = user
end
def reset_user_session_post_login
......@@ -62,7 +62,7 @@ class LoginController < ApplicationController
# Login ok
reset_user_session_post_login
save_login_token(res)
save_login_token(res, @input_user_id)
session[:logged_in] << current_login_service_name
session[:logged_in].uniq!
......
......@@ -40,12 +40,14 @@ class SamlLoginController < LoginController
if has_login_token?
update_session_expiry
load_custom_params_new
if res = ApiBackend::reissue_saml(session[:login_user],
user = session[:login_user]
if res = ApiBackend::reissue_saml(user,
session[:login_token],
@saml_request)
reset_user_session_post_login
save_login_token(res)
save_login_token(res, user)
session[:logged_in] << current_login_service_name
session[:logged_in].uniq!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment