From fa7303bc99ed56e6770928d59e16ee3306e26750 Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Mon, 27 Mar 2023 03:19:43 +0300 Subject: several tests on user_manager extension --- core/classes/Request.php | 2 +- core/classes/authentication/Core/PasswordTrait.php | 6 +++--- core/classes/authentication/Core/UserManager.php | 10 +++++----- core/classes/authentication/Core/UserManagerInterface.php | 8 ++++---- core/classes/authentication/Token/UserToken.php | 6 +++--- core/classes/authentication/Token/UserTokenInterface.php | 6 +++--- core/classes/authentication/User.php | 3 ++- core/classes/authentication/UserInterface.php | 2 +- 8 files changed, 22 insertions(+), 21 deletions(-) (limited to 'core/classes') diff --git a/core/classes/Request.php b/core/classes/Request.php index 6b82dc5..cedb8a1 100644 --- a/core/classes/Request.php +++ b/core/classes/Request.php @@ -87,7 +87,7 @@ class Request // TODO: // ... // if SCRF-token is not valideted, serve 403 - return $array; + return true; } diff --git a/core/classes/authentication/Core/PasswordTrait.php b/core/classes/authentication/Core/PasswordTrait.php index 2d3cbd2..40a7381 100644 --- a/core/classes/authentication/Core/PasswordTrait.php +++ b/core/classes/authentication/Core/PasswordTrait.php @@ -4,9 +4,9 @@ * @package DevCoder\Authentication\Core * */ -// namespace DevCoder\Authentication\Core; - -// use DevCoder\Authentication\UserInterface; +# namespace DevCoder\Authentication\Core; +# +# use DevCoder\Authentication\UserInterface; trait PasswordTrait { diff --git a/core/classes/authentication/Core/UserManager.php b/core/classes/authentication/Core/UserManager.php index 776cee9..a3c1cd5 100644 --- a/core/classes/authentication/Core/UserManager.php +++ b/core/classes/authentication/Core/UserManager.php @@ -4,11 +4,11 @@ * @package DevCoder\Authentication\Core * */ -// namespace DevCoder\Authentication\Core; - -// use DevCoder\Authentication\Token\UserToken; -// use DevCoder\Authentication\Token\UserTokenInterface; -// use DevCoder\Authentication\UserInterface; +# namespace DevCoder\Authentication\Core; +# +# use DevCoder\Authentication\Token\UserToken; +# use DevCoder\Authentication\Token\UserTokenInterface; +# use DevCoder\Authentication\UserInterface; class UserManager implements UserManagerInterface { diff --git a/core/classes/authentication/Core/UserManagerInterface.php b/core/classes/authentication/Core/UserManagerInterface.php index 4702992..05110fb 100644 --- a/core/classes/authentication/Core/UserManagerInterface.php +++ b/core/classes/authentication/Core/UserManagerInterface.php @@ -4,10 +4,10 @@ * @package DevCoder\Authentication\Core * */ -// namespace DevCoder\Authentication\Core; - -// use DevCoder\Authentication\Token\UserTokenInterface; -// use DevCoder\Authentication\UserInterface; +# namespace DevCoder\Authentication\Core; +# +# use DevCoder\Authentication\Token\UserTokenInterface; +# use DevCoder\Authentication\UserInterface; interface UserManagerInterface { diff --git a/core/classes/authentication/Token/UserToken.php b/core/classes/authentication/Token/UserToken.php index 520d4ad..b9bb024 100644 --- a/core/classes/authentication/Token/UserToken.php +++ b/core/classes/authentication/Token/UserToken.php @@ -4,9 +4,9 @@ * @package DevCoder\Authentication * */ -// namespace DevCoder\Authentication\Token; - -// use DevCoder\Authentication\UserInterface; +# namespace DevCoder\Authentication\Token; +# +# use DevCoder\Authentication\UserInterface; class UserToken implements UserTokenInterface { diff --git a/core/classes/authentication/Token/UserTokenInterface.php b/core/classes/authentication/Token/UserTokenInterface.php index f095a17..8e8b642 100644 --- a/core/classes/authentication/Token/UserTokenInterface.php +++ b/core/classes/authentication/Token/UserTokenInterface.php @@ -4,9 +4,9 @@ * @package DevCoder\Authentication\Token * */ -// namespace DevCoder\Authentication\Token; - -// use DevCoder\Authentication\UserInterface; +# namespace DevCoder\Authentication\Token; +# +# use DevCoder\Authentication\UserInterface; interface UserTokenInterface { diff --git a/core/classes/authentication/User.php b/core/classes/authentication/User.php index cc9d5e3..06f0ddb 100644 --- a/core/classes/authentication/User.php +++ b/core/classes/authentication/User.php @@ -6,7 +6,7 @@ * @package DevCoder\Authentication * */ -// namespace DevCoder\Authentication; +# namespace DevCoder\Authentication; class User implements UserInterface { @@ -27,6 +27,7 @@ class User implements UserInterface private $enabled = true; + /** GETs * ------------------------------------------------------------------------- */ diff --git a/core/classes/authentication/UserInterface.php b/core/classes/authentication/UserInterface.php index f81a9ee..b035215 100644 --- a/core/classes/authentication/UserInterface.php +++ b/core/classes/authentication/UserInterface.php @@ -5,7 +5,7 @@ * @package DevCoder\Authentication * */ -// namespace DevCoder\Authentication; +# namespace DevCoder\Authentication; interface UserInterface { -- cgit v1.2.3