From 299c7a9c10c9b2ecb618c762effedfcffe3593ee Mon Sep 17 00:00:00 2001 From: domenico Date: Mon, 2 Dec 2024 13:17:06 +0100 Subject: [PATCH] Restored API login validation --- lib/Controller/API/Commons/Validators/LoginValidator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Controller/API/Commons/Validators/LoginValidator.php b/lib/Controller/API/Commons/Validators/LoginValidator.php index 3c3a4e4890..fa3394a28a 100644 --- a/lib/Controller/API/Commons/Validators/LoginValidator.php +++ b/lib/Controller/API/Commons/Validators/LoginValidator.php @@ -18,7 +18,7 @@ class LoginValidator extends Base { /** * @var KleinController */ - protected $controller; + protected KleinController $controller; public function __construct( KleinController $controller ) { @@ -28,8 +28,8 @@ public function __construct( KleinController $controller ) { } public function _validate() { -// if( !$this->controller->isLoggedIn() ){ -// throw new AuthenticationError( "Invalid Login.", 401 ); -// } + if( !$this->controller->isLoggedIn() ){ + throw new AuthenticationError( "Invalid Login.", 401 ); + } } } \ No newline at end of file