aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-01-08 17:47:22 +0100
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-01-11 14:02:15 +0100
commit95ea6188dc43aaccd648a9bcdd1a3de77e4233c9 (patch)
tree5b392901dba729229e934132e398fa8edd1800d8 /core/Controller
parenteee9f1eec417c9bb976046e4114d3df943da62e1 (diff)
downloadnextcloud-server-95ea6188dc43aaccd648a9bcdd1a3de77e4233c9.tar.gz
nextcloud-server-95ea6188dc43aaccd648a9bcdd1a3de77e4233c9.zip
Suppress or fix psalm errors related to InvalidTokenException
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/ClientFlowLoginController.php3
-rw-r--r--core/Controller/ClientFlowLoginV2Controller.php3
2 files changed, 2 insertions, 4 deletions
diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php
index 57f57bbf887..40b47a6685d 100644
--- a/core/Controller/ClientFlowLoginController.php
+++ b/core/Controller/ClientFlowLoginController.php
@@ -33,7 +33,6 @@
namespace OC\Core\Controller;
use OC\Authentication\Events\AppPasswordCreatedEvent;
-use OC\Authentication\Exceptions\InvalidTokenException as OcInvalidTokenException;
use OC\Authentication\Exceptions\PasswordlessTokenException;
use OC\Authentication\Token\IProvider;
use OC\Authentication\Token\IToken;
@@ -332,7 +331,7 @@ class ClientFlowLoginController extends Controller {
try {
$token = $this->tokenProvider->getToken($password);
if ($token->getLoginName() !== $user) {
- throw new OcInvalidTokenException('login name does not match');
+ throw new InvalidTokenException('login name does not match');
}
} catch (InvalidTokenException $e) {
$response = new StandaloneTemplateResponse(
diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php
index df522096272..b52672a5ccc 100644
--- a/core/Controller/ClientFlowLoginV2Controller.php
+++ b/core/Controller/ClientFlowLoginV2Controller.php
@@ -27,7 +27,6 @@ declare(strict_types=1);
*/
namespace OC\Core\Controller;
-use OC\Authentication\Exceptions\InvalidTokenException as OcInvalidTokenException;
use OC\Core\Db\LoginFlowV2;
use OC\Core\Exception\LoginFlowV2NotFoundException;
use OC\Core\Service\LoginFlowV2Service;
@@ -212,7 +211,7 @@ class ClientFlowLoginV2Controller extends Controller {
try {
$token = \OC::$server->get(\OC\Authentication\Token\IProvider::class)->getToken($password);
if ($token->getLoginName() !== $user) {
- throw new OcInvalidTokenException('login name does not match');
+ throw new InvalidTokenException('login name does not match');
}
} catch (InvalidTokenException $e) {
$response = new StandaloneTemplateResponse(