mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
00722e9a03
1 changed files with 12 additions and 4 deletions
16
helpers.lua
16
helpers.lua
|
@ -237,15 +237,23 @@ function refresh_logged_in()
|
||||||
"|"..expireTime..
|
"|"..expireTime..
|
||||||
"|"..session_key)
|
"|"..session_key)
|
||||||
is_logged_in = hash == authHash
|
is_logged_in = hash == authHash
|
||||||
if not is_logged_in then
|
if is_logged_in then
|
||||||
logger.info("Hash "..authHash.." rejected for "..user.."@"..ngx.var.remote_addr)
|
|
||||||
else
|
|
||||||
authUser = user
|
authUser = user
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
failReason = "Hash not matching"
|
||||||
end
|
end
|
||||||
return is_logged_in
|
else
|
||||||
|
failReason = "No {user}-password entry in cache"
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
failReason = "No session key"
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
failReason = "Cookie expired"
|
||||||
end
|
end
|
||||||
|
logger.debug("SSOwat cookies rejected for "..user.."@"..ngx.var.remote_addr.." : "..failReason)
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
-- If client set the `Proxy-Authorization` header before reaching the SSO,
|
-- If client set the `Proxy-Authorization` header before reaching the SSO,
|
||||||
|
|
Loading…
Reference in a new issue