Implemented storage of authentication token in database and cookies (latter are isolated per domain)
This commit is contained in:
@ -18,7 +18,6 @@
|
||||
// For debugging purposes - enable it in ../lucidAuth.config.php
|
||||
if ($settings->Debug['LogToFile']) {
|
||||
file_put_contents('../requestHeaders.log', (new DateTime())->format('Y-m-d\TH:i:s.u') . ' --- ' . (json_encode($proxyHeaders, JSON_FORCE_OBJECT)) . PHP_EOL, FILE_APPEND);
|
||||
file_put_contents('../requestHeaders.log', (new DateTime())->format('Y-m-d\TH:i:s.u') . ' --+ ' . (base64_encode(json_encode($proxyHeaders))) . PHP_EOL, FILE_APPEND);
|
||||
}
|
||||
|
||||
# if (sizeof($proxyHeaders) == 0) {
|
||||
@ -28,9 +27,7 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!empty($_COOKIE['JWT']) && validateToken([
|
||||
'JWT' => $_COOKIE['JWT']
|
||||
])['status'] == "Success") {
|
||||
if (!empty($_COOKIE['JWT']) && validateToken($_COOKIE['JWT'])['status'] == "Success") {
|
||||
// Valid authentication token found
|
||||
header("HTTP/1.1 202 Accepted");
|
||||
exit;
|
||||
|
Reference in New Issue
Block a user