Update: laravel 8 to 12, php 7.3 to php 8.3, Jenkinsfile, Unit/Feature testing, vapor, docker

This commit is contained in:
Dillon Ngo
2026-04-03 06:59:39 +08:00
parent 58de1017d7
commit b34b7c19d6
142 changed files with 3334 additions and 1101 deletions
+2 -16
View File
@@ -7,23 +7,9 @@ use App\Classes\ValueObjects\Constants\HttpStatus;
use App\Classes\ValueObjects\Response\ApiResponseObject;
use Closure;
use Exception;
use Tymon\JWTAuth\JWT;
class ValidateToken
{
/** @var JWT */
private $manager;
/**
* ValidateToken constructor.
* @param JWT $manager
*/
public function __construct(JWT $manager)
{
$this->manager = $manager;
}
/**
* Checks if jwt token is valid.
*
@@ -35,9 +21,9 @@ class ValidateToken
{
try {
if(!$this->manager->check()){ throw new AccessUnauthorisedException(); }
if(!auth('api')->check()){ throw new AccessUnauthorisedException(); }
} catch (Exception $exception) {
} catch (Exception) {
return (new ApiResponseObject('Authentication', 'To keep your account secure we need to re-validate your account', HttpStatus::ACCESS_UNAUTHORISED))->handler();