mirror of
https://codeberg.org/SeedDMS/paperless
synced 2024-11-26 07:22:08 +00:00
return same error as paperless-ngx when login fails
This commit is contained in:
parent
62d6ab86c5
commit
6116bbfa4d
|
@ -208,7 +208,7 @@ class SeedDMS_ExtPaperless_RestAPI_Controller { /* {{{ */
|
|||
if($data) {
|
||||
$userobj = $authenticator->authenticate($data['username'], $data['password']);
|
||||
if(!$userobj)
|
||||
return $response->withJson(array('token'=>''), 403);
|
||||
return $response->withJson(array('non_field_errors'=>['Unable to log in with provided credentials.']), 403);
|
||||
else {
|
||||
if(!empty($settings->_extensions['paperless']['jwtsecret'])) {
|
||||
$token = new SeedDMS_JwtToken($settings->_extensions['paperless']['jwtsecret']);
|
||||
|
|
Loading…
Reference in New Issue
Block a user