mirror of
https://codeberg.org/SeedDMS/paperless
synced 2025-02-06 15:05:46 +00:00
use translated message when token has expired
This commit is contained in:
parent
0b7181b44d
commit
a327d9fcaa
|
@ -947,7 +947,7 @@ class SeedDMS_ExtPaperless_RestAPI_Auth { /* {{{ */
|
|||
$tmp = explode(':', json_decode($tokenstr, true));
|
||||
if($tmp[1] < time()) {
|
||||
$logger->log("Jwt has expired at ".date('Y-m-d H:i:s', $tmp[1]), PEAR_LOG_ERR);
|
||||
return $response->withJson("Token has expired", 403);
|
||||
return $response->withJson(getMLText('paperless_token_has_expired'), 403);
|
||||
} else {
|
||||
$logger->log("Token is valid till ".date('Y-m-d H:i:s', $tmp[1]), PEAR_LOG_DEBUG);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user