diff --git a/classes/core_jwt_manager.php b/classes/core_jwt_manager.php index 69247ea..eb6a114 100644 --- a/classes/core_jwt_manager.php +++ b/classes/core_jwt_manager.php @@ -79,7 +79,7 @@ class core_jwt_manager $secret = $this->config->jwtsecret; - return JWT::encode($payload, $secret); + return JWT::encode($payload, $secret, 'HS256'); } /** @@ -96,7 +96,7 @@ class core_jwt_manager $secret = $this->config->jwtsecret; try { - $decoded = JWT::decode($keyvalue, $secret, ['HS256']); + $decoded = JWT::decode($keyvalue, $secret); } catch (\Exception $e) { throw new \moodle_exception('invalidkey'); }