NEW FEATURE: Added authorization

This commit is contained in:
Jeroen De Meerleer 2023-02-18 15:40:16 +01:00
parent 011fd204ec
commit 32f0dad639
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
6 changed files with 374 additions and 149 deletions

View File

@ -8,6 +8,7 @@
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cache;
class AuthenticatedSessionController extends Controller class AuthenticatedSessionController extends Controller
{ {
@ -20,6 +21,8 @@ public function store(LoginRequest $request): JsonResponse
$authid = uuid_create(); $authid = uuid_create();
Cache::set('BBC-' . $authid, ['User' => $request->user()]);
return response()->json(['Success' => true, 'Authorization' => $authid]); return response()->json(['Success' => true, 'Authorization' => $authid]);
} }
} }

View File

@ -0,0 +1,15 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Client\Request;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Auth;
class InfoController extends Controller
{
public function info(): JsonResponse
{
return new JsonResponse(['User' => Auth::user()]);
}
}

View File

@ -0,0 +1,35 @@
<?php
namespace App\Http\Middleware;
use App\Models\User;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cache;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
class EnsureTokenIsValid
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
$token = str_replace('Bearer ', '', $request->headers->get('Authorization'));
$authorization = Cache::get('BBC-' . $token, false);
if(!$authorization) {
throw new UnauthorizedHttpException('You are not logged in');
}
$user = $authorization['User'];
Auth::setUser($user);
return $next($request);
}
}

View File

@ -7,7 +7,7 @@
"require": { "require": {
"php": "^8.0.2", "php": "^8.0.2",
"guzzlehttp/guzzle": "^7.2", "guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^9.19", "laravel/framework": "^v10.0.3",
"laravel/sanctum": "^3.0", "laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7" "laravel/tinker": "^2.7"
}, },
@ -19,7 +19,7 @@
"mockery/mockery": "^1.4.4", "mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1", "nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10", "phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.0" "spatie/laravel-ignition": "^2.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

464
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "f7a8634654481b2963d3ebfb9045e649", "content-hash": "b85602a98a0edbafc29ca645727303d1",
"packages": [ "packages": [
{ {
"name": "brick/math", "name": "brick/math",
@ -898,49 +898,140 @@
"time": "2022-10-26T14:07:24+00:00" "time": "2022-10-26T14:07:24+00:00"
}, },
{ {
"name": "laravel/framework", "name": "guzzlehttp/uri-template",
"version": "v9.49.0", "version": "v1.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/guzzle/uri-template.git",
"reference": "e02d9453442ad0a6a2f5dc9df96ea0319d218026" "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/e02d9453442ad0a6a2f5dc9df96ea0319d218026", "url": "https://api.github.com/repos/guzzle/uri-template/zipball/b945d74a55a25a949158444f09ec0d3c120d69e2",
"reference": "e02d9453442ad0a6a2f5dc9df96ea0319d218026", "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2",
"shasum": ""
},
"require": {
"php": "^7.2.5 || ^8.0",
"symfony/polyfill-php80": "^1.17"
},
"require-dev": {
"phpunit/phpunit": "^8.5.19 || ^9.5.8",
"uri-template/tests": "1.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\UriTemplate\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "George Mponos",
"email": "gmponos@gmail.com",
"homepage": "https://github.com/gmponos"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
}
],
"description": "A polyfill class for uri_template of PHP",
"keywords": [
"guzzlehttp",
"uri-template"
],
"support": {
"issues": "https://github.com/guzzle/uri-template/issues",
"source": "https://github.com/guzzle/uri-template/tree/v1.0.1"
},
"funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://github.com/Nyholm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/uri-template",
"type": "tidelift"
}
],
"time": "2021-10-07T12:57:01+00:00"
},
{
"name": "laravel/framework",
"version": "v10.0.3",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "0bd303853444de33f4fcb16d13bd7574030aa3d4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/0bd303853444de33f4fcb16d13bd7574030aa3d4",
"reference": "0bd303853444de33f4fcb16d13bd7574030aa3d4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"brick/math": "^0.9.3|^0.10.2|^0.11", "brick/math": "^0.9.3|^0.10.2|^0.11",
"composer-runtime-api": "^2.2",
"doctrine/inflector": "^2.0.5", "doctrine/inflector": "^2.0.5",
"dragonmantank/cron-expression": "^3.3.2", "dragonmantank/cron-expression": "^3.3.2",
"egulias/email-validator": "^3.2.1|^4.0", "egulias/email-validator": "^3.2.1|^4.0",
"ext-ctype": "*",
"ext-filter": "*",
"ext-hash": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-openssl": "*", "ext-openssl": "*",
"ext-session": "*",
"ext-tokenizer": "*",
"fruitcake/php-cors": "^1.2", "fruitcake/php-cors": "^1.2",
"laravel/serializable-closure": "^1.2.2", "guzzlehttp/uri-template": "^1.0",
"laravel/serializable-closure": "^1.3",
"league/commonmark": "^2.2.1", "league/commonmark": "^2.2.1",
"league/flysystem": "^3.8.0", "league/flysystem": "^3.8.0",
"monolog/monolog": "^2.0", "monolog/monolog": "^3.0",
"nesbot/carbon": "^2.62.1", "nesbot/carbon": "^2.62.1",
"nunomaduro/termwind": "^1.13", "nunomaduro/termwind": "^1.13",
"php": "^8.0.2", "php": "^8.1",
"psr/container": "^1.1.1|^2.0.1", "psr/container": "^1.1.1|^2.0.1",
"psr/log": "^1.0|^2.0|^3.0", "psr/log": "^1.0|^2.0|^3.0",
"psr/simple-cache": "^1.0|^2.0|^3.0", "psr/simple-cache": "^1.0|^2.0|^3.0",
"ramsey/uuid": "^4.7", "ramsey/uuid": "^4.7",
"symfony/console": "^6.0.9", "symfony/console": "^6.2",
"symfony/error-handler": "^6.0", "symfony/error-handler": "^6.2",
"symfony/finder": "^6.0", "symfony/finder": "^6.2",
"symfony/http-foundation": "^6.0", "symfony/http-foundation": "^6.2",
"symfony/http-kernel": "^6.0", "symfony/http-kernel": "^6.2",
"symfony/mailer": "^6.0", "symfony/mailer": "^6.2",
"symfony/mime": "^6.0", "symfony/mime": "^6.2",
"symfony/process": "^6.0", "symfony/process": "^6.2",
"symfony/routing": "^6.0", "symfony/routing": "^6.2",
"symfony/uid": "^6.0", "symfony/uid": "^6.2",
"symfony/var-dumper": "^6.0", "symfony/var-dumper": "^6.2",
"tijsverkoyen/css-to-inline-styles": "^2.2.5", "tijsverkoyen/css-to-inline-styles": "^2.2.5",
"vlucas/phpdotenv": "^5.4.1", "vlucas/phpdotenv": "^5.4.1",
"voku/portable-ascii": "^2.0" "voku/portable-ascii": "^2.0"
@ -976,6 +1067,7 @@
"illuminate/notifications": "self.version", "illuminate/notifications": "self.version",
"illuminate/pagination": "self.version", "illuminate/pagination": "self.version",
"illuminate/pipeline": "self.version", "illuminate/pipeline": "self.version",
"illuminate/process": "self.version",
"illuminate/queue": "self.version", "illuminate/queue": "self.version",
"illuminate/redis": "self.version", "illuminate/redis": "self.version",
"illuminate/routing": "self.version", "illuminate/routing": "self.version",
@ -989,7 +1081,8 @@
"require-dev": { "require-dev": {
"ably/ably-php": "^1.0", "ably/ably-php": "^1.0",
"aws/aws-sdk-php": "^3.235.5", "aws/aws-sdk-php": "^3.235.5",
"doctrine/dbal": "^2.13.3|^3.1.4", "doctrine/dbal": "^3.5.1",
"ext-gmp": "*",
"fakerphp/faker": "^1.21", "fakerphp/faker": "^1.21",
"guzzlehttp/guzzle": "^7.5", "guzzlehttp/guzzle": "^7.5",
"league/flysystem-aws-s3-v3": "^3.0", "league/flysystem-aws-s3-v3": "^3.0",
@ -998,24 +1091,27 @@
"league/flysystem-read-only": "^3.3", "league/flysystem-read-only": "^3.3",
"league/flysystem-sftp-v3": "^3.0", "league/flysystem-sftp-v3": "^3.0",
"mockery/mockery": "^1.5.1", "mockery/mockery": "^1.5.1",
"orchestra/testbench-core": "^7.16", "orchestra/testbench-core": "^8.0",
"pda/pheanstalk": "^4.0", "pda/pheanstalk": "^4.0",
"phpstan/phpdoc-parser": "^1.15", "phpstan/phpdoc-parser": "^1.15",
"phpstan/phpstan": "^1.4.7", "phpstan/phpstan": "^1.4.7",
"phpunit/phpunit": "^9.5.8", "phpunit/phpunit": "^9.6.0 || ^10.0.7",
"predis/predis": "^1.1.9|^2.0.2", "predis/predis": "^2.0.2",
"symfony/cache": "^6.0", "symfony/cache": "^6.2",
"symfony/http-client": "^6.0" "symfony/http-client": "^6.2.4"
}, },
"suggest": { "suggest": {
"ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).",
"aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).", "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).",
"brianium/paratest": "Required to run tests in parallel (^6.0).", "brianium/paratest": "Required to run tests in parallel (^6.0).",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^3.5.1).",
"ext-apcu": "Required to use the APC cache driver.",
"ext-fileinfo": "Required to use the Filesystem class.",
"ext-ftp": "Required to use the Flysystem FTP driver.", "ext-ftp": "Required to use the Flysystem FTP driver.",
"ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().",
"ext-memcached": "Required to use the memcache cache driver.", "ext-memcached": "Required to use the memcache cache driver.",
"ext-pcntl": "Required to use all features of the queue worker.", "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.",
"ext-pdo": "Required to use all database features.",
"ext-posix": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.",
"ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).",
"fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).",
@ -1031,20 +1127,20 @@
"nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).",
"pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).",
"phpunit/phpunit": "Required to use assertions and run tests (^9.5.8).", "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8).",
"predis/predis": "Required to use the predis connector (^1.1.9|^2.0.2).", "predis/predis": "Required to use the predis connector (^2.0.2).",
"psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).",
"symfony/cache": "Required to PSR-6 cache bridge (^6.0).", "symfony/cache": "Required to PSR-6 cache bridge (^6.2).",
"symfony/filesystem": "Required to enable support for relative symbolic links (^6.0).", "symfony/filesystem": "Required to enable support for relative symbolic links (^6.2).",
"symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.0).", "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.2).",
"symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.0).", "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.2).",
"symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.0).", "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.2).",
"symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)."
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "9.x-dev" "dev-master": "10.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1083,7 +1179,7 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2023-01-31T14:36:47+00:00" "time": "2023-02-16T22:03:27+00:00"
}, },
{ {
"name": "laravel/sanctum", "name": "laravel/sanctum",
@ -1280,16 +1376,16 @@
}, },
{ {
"name": "league/commonmark", "name": "league/commonmark",
"version": "2.3.8", "version": "2.3.9",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/commonmark.git", "url": "https://github.com/thephpleague/commonmark.git",
"reference": "c493585c130544c4e91d2e0e131e6d35cb0cbc47" "reference": "c1e114f74e518daca2729ea8c4bf1167038fa4b5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c493585c130544c4e91d2e0e131e6d35cb0cbc47", "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c1e114f74e518daca2729ea8c4bf1167038fa4b5",
"reference": "c493585c130544c4e91d2e0e131e6d35cb0cbc47", "reference": "c1e114f74e518daca2729ea8c4bf1167038fa4b5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1382,7 +1478,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-12-10T16:02:17+00:00" "time": "2023-02-15T14:07:24+00:00"
}, },
{ {
"name": "league/config", "name": "league/config",
@ -1615,42 +1711,41 @@
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
"version": "2.8.0", "version": "3.3.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Seldaek/monolog.git", "url": "https://github.com/Seldaek/monolog.git",
"reference": "720488632c590286b88b80e62aa3d3d551ad4a50" "reference": "9b5daeaffce5b926cac47923798bba91059e60e2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9b5daeaffce5b926cac47923798bba91059e60e2",
"reference": "720488632c590286b88b80e62aa3d3d551ad4a50", "reference": "9b5daeaffce5b926cac47923798bba91059e60e2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2", "php": ">=8.1",
"psr/log": "^1.0.1 || ^2.0 || ^3.0" "psr/log": "^2.0 || ^3.0"
}, },
"provide": { "provide": {
"psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" "psr/log-implementation": "3.0.0"
}, },
"require-dev": { "require-dev": {
"aws/aws-sdk-php": "^2.4.9 || ^3.0", "aws/aws-sdk-php": "^3.0",
"doctrine/couchdb": "~1.0@dev", "doctrine/couchdb": "~1.0@dev",
"elasticsearch/elasticsearch": "^7 || ^8", "elasticsearch/elasticsearch": "^7 || ^8",
"ext-json": "*", "ext-json": "*",
"graylog2/gelf-php": "^1.4.2", "graylog2/gelf-php": "^1.4.2 || ^2@dev",
"guzzlehttp/guzzle": "^7.4", "guzzlehttp/guzzle": "^7.4.5",
"guzzlehttp/psr7": "^2.2", "guzzlehttp/psr7": "^2.2",
"mongodb/mongodb": "^1.8", "mongodb/mongodb": "^1.8",
"php-amqplib/php-amqplib": "~2.4 || ^3", "php-amqplib/php-amqplib": "~2.4 || ^3",
"phpspec/prophecy": "^1.15", "phpstan/phpstan": "^1.9",
"phpstan/phpstan": "^0.12.91", "phpstan/phpstan-deprecation-rules": "^1.0",
"phpunit/phpunit": "^8.5.14", "phpstan/phpstan-strict-rules": "^1.4",
"predis/predis": "^1.1 || ^2.0", "phpunit/phpunit": "^9.5.26",
"rollbar/rollbar": "^1.3 || ^2 || ^3", "predis/predis": "^1.1 || ^2",
"ruflin/elastica": "^7", "ruflin/elastica": "^7",
"swiftmailer/swiftmailer": "^5.3|^6.0",
"symfony/mailer": "^5.4 || ^6", "symfony/mailer": "^5.4 || ^6",
"symfony/mime": "^5.4 || ^6" "symfony/mime": "^5.4 || ^6"
}, },
@ -1673,7 +1768,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "2.x-dev" "dev-main": "3.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1701,7 +1796,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/Seldaek/monolog/issues", "issues": "https://github.com/Seldaek/monolog/issues",
"source": "https://github.com/Seldaek/monolog/tree/2.8.0" "source": "https://github.com/Seldaek/monolog/tree/3.3.1"
}, },
"funding": [ "funding": [
{ {
@ -1713,7 +1808,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-07-24T11:55:47+00:00" "time": "2023-02-06T13:46:10+00:00"
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
@ -1881,29 +1976,30 @@
}, },
{ {
"name": "nette/utils", "name": "nette/utils",
"version": "v3.2.9", "version": "v4.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nette/utils.git", "url": "https://github.com/nette/utils.git",
"reference": "c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c" "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c", "url": "https://api.github.com/repos/nette/utils/zipball/cacdbf5a91a657ede665c541eda28941d4b09c1e",
"reference": "c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c", "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2 <8.3" "php": ">=8.0 <8.3"
}, },
"conflict": { "conflict": {
"nette/di": "<3.0.6" "nette/finder": "<3",
"nette/schema": "<1.2.2"
}, },
"require-dev": { "require-dev": {
"jetbrains/phpstorm-attributes": "dev-master", "jetbrains/phpstorm-attributes": "dev-master",
"nette/tester": "~2.0", "nette/tester": "^2.4",
"phpstan/phpstan": "^1.0", "phpstan/phpstan": "^1.0",
"tracy/tracy": "^2.3" "tracy/tracy": "^2.9"
}, },
"suggest": { "suggest": {
"ext-gd": "to use Image", "ext-gd": "to use Image",
@ -1917,7 +2013,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.2-dev" "dev-master": "4.0-dev"
} }
}, },
"autoload": { "autoload": {
@ -1961,9 +2057,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/nette/utils/issues", "issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v3.2.9" "source": "https://github.com/nette/utils/tree/v4.0.0"
}, },
"time": "2023-01-18T03:26:20+00:00" "time": "2023-02-02T10:41:53+00:00"
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
@ -2023,16 +2119,16 @@
}, },
{ {
"name": "nunomaduro/termwind", "name": "nunomaduro/termwind",
"version": "v1.15.0", "version": "v1.15.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nunomaduro/termwind.git", "url": "https://github.com/nunomaduro/termwind.git",
"reference": "594ab862396c16ead000de0c3c38f4a5cbe1938d" "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nunomaduro/termwind/zipball/594ab862396c16ead000de0c3c38f4a5cbe1938d", "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/8ab0b32c8caa4a2e09700ea32925441385e4a5dc",
"reference": "594ab862396c16ead000de0c3c38f4a5cbe1938d", "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2089,7 +2185,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/nunomaduro/termwind/issues", "issues": "https://github.com/nunomaduro/termwind/issues",
"source": "https://github.com/nunomaduro/termwind/tree/v1.15.0" "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1"
}, },
"funding": [ "funding": [
{ {
@ -2105,7 +2201,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2022-12-20T19:00:15+00:00" "time": "2023-02-08T01:06:31+00:00"
}, },
{ {
"name": "phpoption/phpoption", "name": "phpoption/phpoption",
@ -5575,16 +5671,16 @@
}, },
{ {
"name": "laravel/breeze", "name": "laravel/breeze",
"version": "v1.18.1", "version": "v1.19.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/breeze.git", "url": "https://github.com/laravel/breeze.git",
"reference": "bed2fb2a8a4131be37cc3556826cca961db3406a" "reference": "4bbb1ea3476901c4f5fc706f8d80e4eac31c3afb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/breeze/zipball/bed2fb2a8a4131be37cc3556826cca961db3406a", "url": "https://api.github.com/repos/laravel/breeze/zipball/4bbb1ea3476901c4f5fc706f8d80e4eac31c3afb",
"reference": "bed2fb2a8a4131be37cc3556826cca961db3406a", "reference": "4bbb1ea3476901c4f5fc706f8d80e4eac31c3afb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5632,20 +5728,20 @@
"issues": "https://github.com/laravel/breeze/issues", "issues": "https://github.com/laravel/breeze/issues",
"source": "https://github.com/laravel/breeze" "source": "https://github.com/laravel/breeze"
}, },
"time": "2023-01-31T16:16:21+00:00" "time": "2023-02-14T16:22:13+00:00"
}, },
{ {
"name": "laravel/pint", "name": "laravel/pint",
"version": "v1.4.1", "version": "v1.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/pint.git", "url": "https://github.com/laravel/pint.git",
"reference": "80ddf23a5d97825e79bb1018eebb6f3f985d4fa8" "reference": "e0a8cef58b74662f27355be9cdea0e726bbac362"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/80ddf23a5d97825e79bb1018eebb6f3f985d4fa8", "url": "https://api.github.com/repos/laravel/pint/zipball/e0a8cef58b74662f27355be9cdea0e726bbac362",
"reference": "80ddf23a5d97825e79bb1018eebb6f3f985d4fa8", "reference": "e0a8cef58b74662f27355be9cdea0e726bbac362",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5656,13 +5752,13 @@
"php": "^8.0" "php": "^8.0"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^3.14", "friendsofphp/php-cs-fixer": "^3.14.4",
"illuminate/view": "^9.32.0", "illuminate/view": "^9.51.0",
"laravel-zero/framework": "^9.2.0", "laravel-zero/framework": "^9.2.0",
"mockery/mockery": "^1.5.1", "mockery/mockery": "^1.5.1",
"nunomaduro/larastan": "^2.2.0", "nunomaduro/larastan": "^2.4.0",
"nunomaduro/termwind": "^1.14.0", "nunomaduro/termwind": "^1.15.1",
"pestphp/pest": "^1.22.1" "pestphp/pest": "^1.22.4"
}, },
"bin": [ "bin": [
"builds/pint" "builds/pint"
@ -5698,27 +5794,28 @@
"issues": "https://github.com/laravel/pint/issues", "issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint" "source": "https://github.com/laravel/pint"
}, },
"time": "2023-01-31T15:50:45+00:00" "time": "2023-02-14T16:31:02+00:00"
}, },
{ {
"name": "laravel/sail", "name": "laravel/sail",
"version": "v1.19.0", "version": "v1.20.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/sail.git", "url": "https://github.com/laravel/sail.git",
"reference": "4f230634a3163f3442def6a4e6ffdb02b02e14d6" "reference": "5ae072b182b1efbec927409e8a3ce3b1078cc42c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/sail/zipball/4f230634a3163f3442def6a4e6ffdb02b02e14d6", "url": "https://api.github.com/repos/laravel/sail/zipball/5ae072b182b1efbec927409e8a3ce3b1078cc42c",
"reference": "4f230634a3163f3442def6a4e6ffdb02b02e14d6", "reference": "5ae072b182b1efbec927409e8a3ce3b1078cc42c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"illuminate/console": "^8.0|^9.0|^10.0", "illuminate/console": "^8.0|^9.0|^10.0",
"illuminate/contracts": "^8.0|^9.0|^10.0", "illuminate/contracts": "^8.0|^9.0|^10.0",
"illuminate/support": "^8.0|^9.0|^10.0", "illuminate/support": "^8.0|^9.0|^10.0",
"php": "^7.3|^8.0" "php": "^7.3|^8.0",
"symfony/yaml": "^6.0"
}, },
"bin": [ "bin": [
"bin/sail" "bin/sail"
@ -5758,7 +5855,7 @@
"issues": "https://github.com/laravel/sail/issues", "issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail" "source": "https://github.com/laravel/sail"
}, },
"time": "2023-01-31T13:37:57+00:00" "time": "2023-02-08T20:22:21+00:00"
}, },
{ {
"name": "mockery/mockery", "name": "mockery/mockery",
@ -6410,16 +6507,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "9.5.28", "version": "9.6.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "954ca3113a03bf780d22f07bf055d883ee04b65e" "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/954ca3113a03bf780d22f07bf055d883ee04b65e", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7b1615e3e887d6c719121c6d4a44b0ab9645555",
"reference": "954ca3113a03bf780d22f07bf055d883ee04b65e", "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6461,7 +6558,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "9.5-dev" "dev-master": "9.6-dev"
} }
}, },
"autoload": { "autoload": {
@ -6492,7 +6589,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.28" "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.3"
}, },
"funding": [ "funding": [
{ {
@ -6508,7 +6605,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-14T12:32:24+00:00" "time": "2023-02-04T13:37:15+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",
@ -6876,16 +6973,16 @@
}, },
{ {
"name": "sebastian/environment", "name": "sebastian/environment",
"version": "5.1.4", "version": "5.1.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/environment.git", "url": "https://github.com/sebastianbergmann/environment.git",
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6927,7 +7024,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/environment/issues", "issues": "https://github.com/sebastianbergmann/environment/issues",
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
}, },
"funding": [ "funding": [
{ {
@ -6935,7 +7032,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2022-04-03T09:37:03+00:00" "time": "2023-02-03T06:03:51+00:00"
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
@ -7249,16 +7346,16 @@
}, },
{ {
"name": "sebastian/recursion-context", "name": "sebastian/recursion-context",
"version": "4.0.4", "version": "4.0.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git", "url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
"reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7297,10 +7394,10 @@
} }
], ],
"description": "Provides functionality to recursively process PHP variables", "description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context", "homepage": "https://github.com/sebastianbergmann/recursion-context",
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues", "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
"source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5"
}, },
"funding": [ "funding": [
{ {
@ -7308,7 +7405,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2020-10-26T13:17:30+00:00" "time": "2023-02-03T06:07:39+00:00"
}, },
{ {
"name": "sebastian/resource-operations", "name": "sebastian/resource-operations",
@ -7367,16 +7464,16 @@
}, },
{ {
"name": "sebastian/type", "name": "sebastian/type",
"version": "3.2.0", "version": "3.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/type.git", "url": "https://github.com/sebastianbergmann/type.git",
"reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
"reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7411,7 +7508,7 @@
"homepage": "https://github.com/sebastianbergmann/type", "homepage": "https://github.com/sebastianbergmann/type",
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/type/issues", "issues": "https://github.com/sebastianbergmann/type/issues",
"source": "https://github.com/sebastianbergmann/type/tree/3.2.0" "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
}, },
"funding": [ "funding": [
{ {
@ -7419,7 +7516,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2022-09-12T14:47:03+00:00" "time": "2023-02-03T06:13:03+00:00"
}, },
{ {
"name": "sebastian/version", "name": "sebastian/version",
@ -7681,41 +7778,37 @@
}, },
{ {
"name": "spatie/laravel-ignition", "name": "spatie/laravel-ignition",
"version": "1.6.4", "version": "2.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/spatie/laravel-ignition.git", "url": "https://github.com/spatie/laravel-ignition.git",
"reference": "1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc" "reference": "70c0e2a22c5c4b691a34db8c98bd6d695660a97a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc", "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/70c0e2a22c5c4b691a34db8c98bd6d695660a97a",
"reference": "1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc", "reference": "70c0e2a22c5c4b691a34db8c98bd6d695660a97a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-curl": "*", "ext-curl": "*",
"ext-json": "*", "ext-json": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"illuminate/support": "^8.77|^9.27", "illuminate/support": "^10.0",
"monolog/monolog": "^2.3", "php": "^8.1",
"php": "^8.0", "spatie/flare-client-php": "^1.3.5",
"spatie/flare-client-php": "^1.0.1", "spatie/ignition": "^1.4.3",
"spatie/ignition": "^1.4.1", "symfony/console": "^6.2.3",
"symfony/console": "^5.0|^6.0", "symfony/var-dumper": "^6.2.3"
"symfony/var-dumper": "^5.0|^6.0"
}, },
"require-dev": { "require-dev": {
"filp/whoops": "^2.14", "livewire/livewire": "^2.11",
"livewire/livewire": "^2.8|dev-develop", "mockery/mockery": "^1.5.1",
"mockery/mockery": "^1.4", "orchestra/testbench": "^8.0",
"nunomaduro/larastan": "^1.0", "pestphp/pest": "^1.22.3",
"orchestra/testbench": "^6.23|^7.0", "phpstan/extension-installer": "^1.2",
"pestphp/pest": "^1.20", "phpstan/phpstan-deprecation-rules": "^1.1.1",
"phpstan/extension-installer": "^1.1", "phpstan/phpstan-phpunit": "^1.3.3"
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"spatie/laravel-ray": "^1.27"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -7726,6 +7819,9 @@
"aliases": { "aliases": {
"Flare": "Spatie\\LaravelIgnition\\Facades\\Flare" "Flare": "Spatie\\LaravelIgnition\\Facades\\Flare"
} }
},
"branch-alias": {
"dev-main": "2.0-dev"
} }
}, },
"autoload": { "autoload": {
@ -7767,7 +7863,81 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-01-03T19:28:04+00:00" "time": "2023-01-24T07:20:39+00:00"
},
{
"name": "symfony/yaml",
"version": "v6.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "2bbfbdacc8a15574f8440c4838ce0d7bb6c86b19"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/2bbfbdacc8a15574f8440c4838ce0d7bb6c86b19",
"reference": "2bbfbdacc8a15574f8440c4838ce0d7bb6c86b19",
"shasum": ""
},
"require": {
"php": ">=8.1",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"symfony/console": "<5.4"
},
"require-dev": {
"symfony/console": "^5.4|^6.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"bin": [
"Resources/bin/yaml-lint"
],
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v6.2.5"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2023-01-10T18:53:53+00:00"
}, },
{ {
"name": "theseer/tokenizer", "name": "theseer/tokenizer",

View File

@ -18,5 +18,7 @@
return $request->user(); return $request->user();
}); });
Route::middleware(\App\Http\Middleware\EnsureTokenIsValid::class)
->get('/info', [\App\Http\Controllers\InfoController::class, 'info']);
require __DIR__.'/auth.php'; require __DIR__.'/auth.php';