JWT introduce other algorithms

This commit is contained in:
2022-10-23 21:26:27 +02:00
parent 7a4222ac39
commit c277aababc
5 changed files with 85 additions and 21 deletions

View File

@@ -99,7 +99,7 @@ class Context {
try {
$token = $_COOKIE['session'];
$settings = $this->configuration->getSettings();
$decoded = (array)JWT::decode($token, $settings->getJwtKey());
$decoded = (array)JWT::decode($token, $settings->getJwtSecretKey());
if (!is_null($decoded)) {
$userId = ($decoded['userId'] ?? NULL);
$sessionId = ($decoded['sessionId'] ?? NULL);