fix error

This commit is contained in:
邱博亞 2022-01-25 11:51:28 +08:00
parent a2ec4b9334
commit 820ee81cbb
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
module LdapLogin::Login
LDAP_ADSERVER="https://ap99.mdu.edu.tw/MduDB/api/Auth/token/1"
AppKey = "YhoRop0YmL6"
AppKey = "OCz3t1nQWD"
def ldap_login_auth(user,request,session,flash,params)
error = ''
ldap_user = params[:user_name]
@ -21,7 +21,7 @@ module LdapLogin::Login
if res.code == '200' && JSON.load(res.body)["userID"]==ldap_user
if !user.nil?
session[:user_id] = ldap_user
session[:user_id] = user.id
session[:login_referer] = nil
if params[:referer_url]
url = URI.parse(params[:referer_url]).path