diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 7faea1a05..4a326722e 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -33,16 +33,14 @@ public function login(Request $request) } $user = $request->user(); - $tokenResult = $user->createToken('Personal Access Token'); - $token = $tokenResult->token; - $token->save(); + $token = $user->createToken('laravue'); - return response()->json(new UserResource($user), Response::HTTP_OK)->header('Authorization', $tokenResult->accessToken); + return response()->json(new UserResource($user), Response::HTTP_OK)->header('Authorization', $token->plainTextToken); } public function logout(Request $request) { - $request->user()->token()->revoke(); + $request->user()->tokens()->delete(); return response()->json((new JsonResponse())->success([]), Response::HTTP_OK); } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index c7a5ef305..3823b95cb 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -3,6 +3,8 @@ namespace App\Http; use Illuminate\Foundation\Http\Kernel as HttpKernel; +use Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful; + class Kernel extends HttpKernel { @@ -38,8 +40,9 @@ class Kernel extends HttpKernel ], 'api' => [ + EnsureFrontendRequestsAreStateful::class, 'throttle:60,1', - 'bindings', + \Illuminate\Routing\Middleware\SubstituteBindings::class, ], ]; diff --git a/app/Laravue/Models/User.php b/app/Laravue/Models/User.php index 142d018c3..6e818c04b 100644 --- a/app/Laravue/Models/User.php +++ b/app/Laravue/Models/User.php @@ -4,8 +4,8 @@ use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; -use Laravel\Passport\HasApiTokens; use Spatie\Permission\Traits\HasRoles; +use Laravel\Sanctum\HasApiTokens; /** * Class User diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 90ce09b81..7971bf7cc 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -3,8 +3,6 @@ namespace App\Providers; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Gate; -use Laravel\Passport\Passport; class AuthServiceProvider extends ServiceProvider { @@ -25,7 +23,5 @@ class AuthServiceProvider extends ServiceProvider public function boot() { $this->registerPolicies(); - - Passport::routes(); } } diff --git a/composer.json b/composer.json index 04b23eae1..5f2d30198 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "php": "^7.2", "fideloper/proxy": "^4.0", "laravel/framework": "^7.0", - "laravel/passport": "^8.4", + "laravel/sanctum": "^2.1", "laravel/tinker": "^2.0", "league/flysystem-aws-s3-v3": "^1.0", "spatie/laravel-permission": "^3.0" diff --git a/composer.lock b/composer.lock index 8a38ee249..8f779aad1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "80599181726cae2eebc93e06e0fd71c3", + "content-hash": "91c42c1eeb4d682a165286d0b8acfd67", "packages": [ { "name": "aws/aws-sdk-php", - "version": "3.133.34", + "version": "3.133.43", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "02131fd17c9b62f36993bb2da88dd624ce058179" + "reference": "7c8211d403614f83ce499ee217248660456d2f46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/02131fd17c9b62f36993bb2da88dd624ce058179", - "reference": "02131fd17c9b62f36993bb2da88dd624ce058179", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7c8211d403614f83ce499ee217248660456d2f46", + "reference": "7c8211d403614f83ce499ee217248660456d2f46", "shasum": "" }, "require": { @@ -88,70 +88,52 @@ "s3", "sdk" ], - "time": "2020-03-11T18:17:17+00:00" + "time": "2020-03-24T18:18:11+00:00" }, { - "name": "defuse/php-encryption", - "version": "v2.2.1", + "name": "brick/math", + "version": "0.8.14", "source": { "type": "git", - "url": "https://github.com/defuse/php-encryption.git", - "reference": "0f407c43b953d571421e0020ba92082ed5fb7620" + "url": "https://github.com/brick/math.git", + "reference": "6f7a46b5c3d487b277f38fbd17df57d348cace8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/defuse/php-encryption/zipball/0f407c43b953d571421e0020ba92082ed5fb7620", - "reference": "0f407c43b953d571421e0020ba92082ed5fb7620", + "url": "https://api.github.com/repos/brick/math/zipball/6f7a46b5c3d487b277f38fbd17df57d348cace8a", + "reference": "6f7a46b5c3d487b277f38fbd17df57d348cace8a", "shasum": "" }, "require": { - "ext-openssl": "*", - "paragonie/random_compat": ">= 2", - "php": ">=5.4.0" + "php": ">=7.1" }, "require-dev": { - "nikic/php-parser": "^2.0|^3.0|^4.0", - "phpunit/phpunit": "^4|^5" + "php-coveralls/php-coveralls": "2.*", + "phpunit/phpunit": "7.*", + "vimeo/psalm": "3.*" }, - "bin": [ - "bin/generate-defuse-key" - ], "type": "library", "autoload": { "psr-4": { - "Defuse\\Crypto\\": "src" + "Brick\\Math\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Taylor Hornby", - "email": "taylor@defuse.ca", - "homepage": "https://defuse.ca/" - }, - { - "name": "Scott Arciszewski", - "email": "info@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "Secure PHP Encryption Library", + "description": "Arbitrary-precision arithmetic library", "keywords": [ - "aes", - "authenticated encryption", - "cipher", - "crypto", - "cryptography", - "encrypt", - "encryption", - "openssl", - "security", - "symmetric key cryptography" - ], - "time": "2018-07-24T23:27:56+00:00" + "Arbitrary-precision", + "BigInteger", + "BigRational", + "arithmetic", + "bigdecimal", + "bignum", + "brick", + "math" + ], + "time": "2020-02-17T13:57:43+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -481,52 +463,6 @@ ], "time": "2020-02-22T01:51:47+00:00" }, - { - "name": "firebase/php-jwt", - "version": "v5.1.0", - "source": { - "type": "git", - "url": "https://github.com/firebase/php-jwt.git", - "reference": "4566062c68f76f43d44f1643f4970fe89757d4c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/4566062c68f76f43d44f1643f4970fe89757d4c6", - "reference": "4566062c68f76f43d44f1643f4970fe89757d4c6", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8|^5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Firebase\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Neuman Vong", - "email": "neuman+pear@twilio.com", - "role": "Developer" - }, - { - "name": "Anant Narayanan", - "email": "anant@php.net", - "role": "Developer" - } - ], - "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", - "homepage": "https://github.com/firebase/php-jwt", - "time": "2020-02-24T23:15:03+00:00" - }, { "name": "guzzlehttp/guzzle", "version": "6.5.2", @@ -804,154 +740,18 @@ "description": "Highlight PHP code in terminal", "time": "2018-09-29T18:48:56+00:00" }, - { - "name": "laminas/laminas-diactoros", - "version": "2.2.2", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "95178c4751d737cdf9ab0a9f70a42754ac860e7b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/95178c4751d737cdf9ab0a9f70a42754ac860e7b", - "reference": "95178c4751d737cdf9ab0a9f70a42754ac860e7b", - "shasum": "" - }, - "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.1", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "conflict": { - "phpspec/prophecy": "<1.9.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "replace": { - "zendframework/zend-diactoros": "self.version" - }, - "require-dev": { - "ext-curl": "*", - "ext-dom": "*", - "ext-libxml": "*", - "http-interop/http-factory-tests": "^0.5.0", - "laminas/laminas-coding-standard": "~1.0.0", - "php-http/psr7-integration-tests": "dev-master", - "phpunit/phpunit": "^7.5.18" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev", - "dev-develop": "2.2.x-dev", - "dev-release-1.8": "1.8.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php", - "src/functions/create_uploaded_file.legacy.php", - "src/functions/marshal_headers_from_sapi.legacy.php", - "src/functions/marshal_method_from_sapi.legacy.php", - "src/functions/marshal_protocol_version_from_sapi.legacy.php", - "src/functions/marshal_uri_from_sapi.legacy.php", - "src/functions/normalize_server.legacy.php", - "src/functions/normalize_uploaded_files.legacy.php", - "src/functions/parse_cookie_header.legacy.php" - ], - "psr-4": { - "Laminas\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "PSR HTTP Message implementations", - "homepage": "https://laminas.dev", - "keywords": [ - "http", - "laminas", - "psr", - "psr-7" - ], - "time": "2020-01-07T19:39:26+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "0fb9675b84a1666ab45182b6c5b29956921e818d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/0fb9675b84a1666ab45182b6c5b29956921e818d", - "reference": "0fb9675b84a1666ab45182b6c5b29956921e818d", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev", - "dev-develop": "1.1.x-dev" - }, - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" - } - }, - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", - "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" - ], - "time": "2020-01-07T22:58:31+00:00" - }, { "name": "laravel/framework", - "version": "v7.1.1", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "b0328b500dfff44e75af103d57d81cdee83e5ce9" + "reference": "36d8958b5b8058ef0641806e490f91102fdea70d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/b0328b500dfff44e75af103d57d81cdee83e5ce9", - "reference": "b0328b500dfff44e75af103d57d81cdee83e5ce9", + "url": "https://api.github.com/repos/laravel/framework/zipball/36d8958b5b8058ef0641806e490f91102fdea70d", + "reference": "36d8958b5b8058ef0641806e490f91102fdea70d", "shasum": "" }, "require": { @@ -969,7 +769,7 @@ "php": "^7.2.5", "psr/container": "^1.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "^3.7", + "ramsey/uuid": "^3.7|^4.0", "swiftmailer/swiftmailer": "^6.0", "symfony/console": "^5.0", "symfony/error-handler": "^5.0", @@ -1039,7 +839,7 @@ "ext-memcached": "Required to use the memcache cache driver.", "ext-pcntl": "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.", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "filp/whoops": "Required for friendly error pages in development (^2.4).", "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0).", @@ -1089,61 +889,48 @@ "framework", "laravel" ], - "time": "2020-03-12T13:06:49+00:00" + "time": "2020-03-24T15:17:51+00:00" }, { - "name": "laravel/passport", - "version": "v8.4.1", + "name": "laravel/sanctum", + "version": "v2.1.0", "source": { "type": "git", - "url": "https://github.com/laravel/passport.git", - "reference": "4088cdf174d25ccf3fb79d234b94b2a90785fa69" + "url": "https://github.com/laravel/sanctum.git", + "reference": "f3d45b92d4187ea5eb37f82c1a0dce23c9b0b17a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/passport/zipball/4088cdf174d25ccf3fb79d234b94b2a90785fa69", - "reference": "4088cdf174d25ccf3fb79d234b94b2a90785fa69", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/f3d45b92d4187ea5eb37f82c1a0dce23c9b0b17a", + "reference": "f3d45b92d4187ea5eb37f82c1a0dce23c9b0b17a", "shasum": "" }, "require": { "ext-json": "*", - "firebase/php-jwt": "^3.0|^4.0|^5.0", - "guzzlehttp/guzzle": "^6.0", - "illuminate/auth": "^6.0|^7.0", - "illuminate/console": "^6.0|^7.0", - "illuminate/container": "^6.0|^7.0", - "illuminate/contracts": "^6.0|^7.0", - "illuminate/cookie": "^6.0|^7.0", - "illuminate/database": "^6.0|^7.0", - "illuminate/encryption": "^6.0|^7.0", - "illuminate/http": "^6.0|^7.0", - "illuminate/support": "^6.0|^7.0", - "laminas/laminas-diactoros": "^2.2", - "league/oauth2-server": "^8.0", - "nyholm/psr7": "^1.0", - "php": "^7.2", - "phpseclib/phpseclib": "^2.0", - "symfony/psr-http-message-bridge": "^2.0" + "illuminate/contracts": "^6.9|^7.0", + "illuminate/database": "^6.9|^7.0", + "illuminate/support": "^6.9|^7.0", + "php": "^7.2" }, "require-dev": { "mockery/mockery": "^1.0", - "orchestra/testbench": "^4.4|^5.0", + "orchestra/testbench": "^4.0|^5.0", "phpunit/phpunit": "^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.x-dev" + "dev-master": "1.x-dev" }, "laravel": { "providers": [ - "Laravel\\Passport\\PassportServiceProvider" + "Laravel\\Sanctum\\SanctumServiceProvider" ] } }, "autoload": { "psr-4": { - "Laravel\\Passport\\": "src/" + "Laravel\\Sanctum\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1156,34 +943,34 @@ "email": "taylor@laravel.com" } ], - "description": "Laravel Passport provides OAuth2 server support to Laravel.", + "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.", "keywords": [ + "auth", "laravel", - "oauth", - "passport" + "sanctum" ], - "time": "2020-03-04T13:55:07+00:00" + "time": "2020-03-24T16:01:07+00:00" }, { "name": "laravel/tinker", - "version": "v2.2.0", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "37579c93271ec30ef099dd633ec7c2de5e5fb112" + "reference": "5271893ec90ad9f8d3e34792ac6b72cad3b84cc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/37579c93271ec30ef099dd633ec7c2de5e5fb112", - "reference": "37579c93271ec30ef099dd633ec7c2de5e5fb112", + "url": "https://api.github.com/repos/laravel/tinker/zipball/5271893ec90ad9f8d3e34792ac6b72cad3b84cc2", + "reference": "5271893ec90ad9f8d3e34792ac6b72cad3b84cc2", "shasum": "" }, "require": { - "illuminate/console": "^6.0|^7.0", - "illuminate/contracts": "^6.0|^7.0", - "illuminate/support": "^6.0|^7.0", + "illuminate/console": "^6.0|^7.0|^8.0", + "illuminate/contracts": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0", "php": "^7.2", - "psy/psysh": "^0.9", + "psy/psysh": "^0.9|^0.10", "symfony/var-dumper": "^4.0|^5.0" }, "require-dev": { @@ -1191,7 +978,7 @@ "phpunit/phpunit": "^8.0|^9.0" }, "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0)." }, "type": "library", "extra": { @@ -1226,62 +1013,7 @@ "laravel", "psysh" ], - "time": "2020-02-05T15:00:44+00:00" - }, - { - "name": "lcobucci/jwt", - "version": "3.3.1", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/jwt.git", - "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", - "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-openssl": "*", - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "mikey179/vfsstream": "~1.5", - "phpmd/phpmd": "~2.2", - "phpunit/php-invoker": "~1.1", - "phpunit/phpunit": "^5.7 || ^7.3", - "squizlabs/php_codesniffer": "~2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Lcobucci\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Luís Otávio Cobucci Oblonczyk", - "email": "lcobucci@gmail.com", - "role": "Developer" - } - ], - "description": "A simple library to work with JSON Web Token and JSON Web Signature", - "keywords": [ - "JWS", - "jwt" - ], - "time": "2019-05-24T18:30:49+00:00" + "time": "2020-03-17T15:34:59+00:00" }, { "name": "league/commonmark", @@ -1357,68 +1089,18 @@ ], "time": "2020-02-28T18:53:50+00:00" }, - { - "name": "league/event", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/event.git", - "reference": "d2cc124cf9a3fab2bb4ff963307f60361ce4d119" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/event/zipball/d2cc124cf9a3fab2bb4ff963307f60361ce4d119", - "reference": "d2cc124cf9a3fab2bb4ff963307f60361ce4d119", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "~1.0.1", - "phpspec/phpspec": "^2.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Event\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Event package", - "keywords": [ - "emitter", - "event", - "listener" - ], - "time": "2018-11-26T11:52:41+00:00" - }, { "name": "league/flysystem", - "version": "1.0.65", + "version": "1.0.66", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "8f17b3ba67097aafb8318cd5c553b1acf7c891c8" + "reference": "021569195e15f8209b1c4bebb78bd66aa4f08c21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8f17b3ba67097aafb8318cd5c553b1acf7c891c8", - "reference": "8f17b3ba67097aafb8318cd5c553b1acf7c891c8", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/021569195e15f8209b1c4bebb78bd66aa4f08c21", + "reference": "021569195e15f8209b1c4bebb78bd66aa4f08c21", "shasum": "" }, "require": { @@ -1489,7 +1171,7 @@ "sftp", "storage" ], - "time": "2020-03-08T18:53:20+00:00" + "time": "2020-03-17T18:58:12+00:00" }, { "name": "league/flysystem-aws-s3-v3", @@ -1538,83 +1220,6 @@ "description": "Flysystem adapter for the AWS S3 SDK v3.x", "time": "2020-02-23T13:31:58+00:00" }, - { - "name": "league/oauth2-server", - "version": "8.0.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "e1dc4d708c56fcfa205be4bb1862b6d525b4baac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/e1dc4d708c56fcfa205be4bb1862b6d525b4baac", - "reference": "e1dc4d708c56fcfa205be4bb1862b6d525b4baac", - "shasum": "" - }, - "require": { - "defuse/php-encryption": "^2.2.1", - "ext-json": "*", - "ext-openssl": "*", - "lcobucci/jwt": "^3.3.1", - "league/event": "^2.2", - "php": ">=7.1.0", - "psr/http-message": "^1.0.1" - }, - "replace": { - "league/oauth2server": "*", - "lncd/oauth2": "*" - }, - "require-dev": { - "phpstan/phpstan": "^0.11.8", - "phpstan/phpstan-phpunit": "^0.11.2", - "phpunit/phpunit": "^7.5.13 || ^8.2.3", - "roave/security-advisories": "dev-master", - "zendframework/zend-diactoros": "^2.1.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "League\\OAuth2\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alex Bilbie", - "email": "hello@alexbilbie.com", - "homepage": "http://www.alexbilbie.com", - "role": "Developer" - }, - { - "name": "Andy Millington", - "email": "andrew@noexceptions.io", - "homepage": "https://www.noexceptions.io", - "role": "Developer" - } - ], - "description": "A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.", - "homepage": "https://oauth2.thephpleague.com/", - "keywords": [ - "Authentication", - "api", - "auth", - "authorisation", - "authorization", - "oauth", - "oauth 2", - "oauth 2.0", - "oauth2", - "protect", - "resource", - "secure", - "server" - ], - "time": "2019-07-13T18:58:26+00:00" - }, { "name": "monolog/monolog", "version": "2.0.2", @@ -1755,16 +1360,16 @@ }, { "name": "nesbot/carbon", - "version": "2.31.0", + "version": "2.32.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "bbc0ab53f41a4c6f223c18efcdbd9bc725eb5d2d" + "reference": "7410a349613bf32d02d8aaed1c669698ddd2b718" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bbc0ab53f41a4c6f223c18efcdbd9bc725eb5d2d", - "reference": "bbc0ab53f41a4c6f223c18efcdbd9bc725eb5d2d", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7410a349613bf32d02d8aaed1c669698ddd2b718", + "reference": "7410a349613bf32d02d8aaed1c669698ddd2b718", "shasum": "" }, "require": { @@ -1773,6 +1378,7 @@ "symfony/translation": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { + "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", "kylekatarnls/multi-tester": "^1.1", "phpmd/phpmd": "^2.8", @@ -1821,7 +1427,7 @@ "datetime", "time" ], - "time": "2020-03-01T11:11:58+00:00" + "time": "2020-03-24T16:01:47+00:00" }, { "name": "nikic/php-parser", @@ -1865,77 +1471,15 @@ ], "authors": [ { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2019-11-08T13:50:10+00:00" - }, - { - "name": "nyholm/psr7", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/Nyholm/psr7.git", - "reference": "55ff6b76573f5b242554c9775792bd59fb52e11c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7/zipball/55ff6b76573f5b242554c9775792bd59fb52e11c", - "reference": "55ff6b76573f5b242554c9775792bd59fb52e11c", - "shasum": "" - }, - "require": { - "php": "^7.1", - "php-http/message-factory": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "http-interop/http-factory-tests": "dev-master", - "php-http/psr7-integration-tests": "dev-master", - "phpunit/phpunit": "^7.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Nyholm\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com" - }, - { - "name": "Martijn van der Ven", - "email": "martijn@vanderven.se" + "name": "Nikita Popov" } ], - "description": "A fast PHP7 implementation of PSR-7", - "homepage": "http://tnyholm.se", + "description": "A PHP parser written in PHP", "keywords": [ - "psr-17", - "psr-7" + "parser", + "php" ], - "time": "2019-09-05T13:24:16+00:00" + "time": "2019-11-08T13:50:10+00:00" }, { "name": "opis/closure", @@ -1998,117 +1542,22 @@ ], "time": "2019-11-29T22:36:02+00:00" }, - { - "name": "paragonie/random_compat", - "version": "v9.99.99", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "shasum": "" - }, - "require": { - "php": "^7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "time": "2018-07-02T15:55:56+00:00" - }, - { - "name": "php-http/message-factory", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-http/message-factory.git", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Factory interfaces for PSR-7 HTTP Message", - "homepage": "http://php-http.org", - "keywords": [ - "factory", - "http", - "message", - "stream", - "uri" - ], - "time": "2015-12-19T14:08:53+00:00" - }, { "name": "phpoption/phpoption", - "version": "1.7.2", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "77f7c4d2e65413aff5b5a8cc8b3caf7a28d81959" + "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/77f7c4d2e65413aff5b5a8cc8b3caf7a28d81959", - "reference": "77f7c4d2e65413aff5b5a8cc8b3caf7a28d81959", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/4acfd6a4b33a509d8c88f50e5222f734b6aeebae", + "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0" + "php": "^5.5.9 || ^7.0 || ^8.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.3", @@ -2146,99 +1595,7 @@ "php", "type" ], - "time": "2019-12-15T19:35:24+00:00" - }, - { - "name": "phpseclib/phpseclib", - "version": "2.0.25", - "source": { - "type": "git", - "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "c18159618ed7cd7ff721ac1a8fec7860a475d2f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c18159618ed7cd7ff721ac1a8fec7860a475d2f0", - "reference": "c18159618ed7cd7ff721ac1a8fec7860a475d2f0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phing/phing": "~2.7", - "phpunit/phpunit": "^4.8.35|^5.7|^6.0", - "sami/sami": "~2.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "suggest": { - "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", - "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", - "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", - "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." - }, - "type": "library", - "autoload": { - "files": [ - "phpseclib/bootstrap.php" - ], - "psr-4": { - "phpseclib\\": "phpseclib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jim Wigginton", - "email": "terrafrost@php.net", - "role": "Lead Developer" - }, - { - "name": "Patrick Monnerat", - "email": "pm@datasphere.ch", - "role": "Developer" - }, - { - "name": "Andreas Fischer", - "email": "bantu@phpbb.com", - "role": "Developer" - }, - { - "name": "Hans-Jürgen Petrich", - "email": "petrich@tronic-media.com", - "role": "Developer" - }, - { - "name": "Graham Campbell", - "email": "graham@alt-three.com", - "role": "Developer" - } - ], - "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", - "homepage": "http://phpseclib.sourceforge.net", - "keywords": [ - "BigInteger", - "aes", - "asn.1", - "asn1", - "blowfish", - "crypto", - "cryptography", - "encryption", - "rsa", - "security", - "sftp", - "signature", - "signing", - "ssh", - "twofish", - "x.509", - "x509" - ], - "time": "2020-02-25T04:16:50+00:00" + "time": "2020-03-21T18:07:53+00:00" }, { "name": "psr/container", @@ -2335,58 +1692,6 @@ ], "time": "2019-01-08T18:20:26+00:00" }, - { - "name": "psr/http-factory", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "time": "2019-04-30T12:38:16+00:00" - }, { "name": "psr/http-message", "version": "1.0.1", @@ -2439,16 +1744,16 @@ }, { "name": "psr/log", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", - "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -2482,7 +1787,7 @@ "psr", "psr-3" ], - "time": "2019-11-01T11:05:21+00:00" + "time": "2020-03-23T09:12:05+00:00" }, { "name": "psr/simple-cache", @@ -2534,32 +1839,31 @@ }, { "name": "psy/psysh", - "version": "v0.9.12", + "version": "v0.10.2", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4" + "reference": "573c2362c3cdebe846b4adae4b630eecb350afd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/90da7f37568aee36b116a030c5f99c915267edd4", - "reference": "90da7f37568aee36b116a030c5f99c915267edd4", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/573c2362c3cdebe846b4adae4b630eecb350afd8", + "reference": "573c2362c3cdebe846b4adae4b630eecb350afd8", "shasum": "" }, "require": { "dnoegel/php-xdg-base-dir": "0.1.*", "ext-json": "*", "ext-tokenizer": "*", - "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", - "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", - "php": ">=5.4.0", - "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0|~5.0", - "symfony/var-dumper": "~2.7|~3.0|~4.0|~5.0" + "jakub-onderka/php-console-highlighter": "0.4.*|0.3.*", + "nikic/php-parser": "~4.0|~3.0|~2.0|~1.3", + "php": "^8.0 || ^7.0 || ^5.5.9", + "symfony/console": "~5.0|~4.0|~3.0|^2.4.2|~2.3.10", + "symfony/var-dumper": "~5.0|~4.0|~3.0|~2.7" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "~2.15|~3.16", - "phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0" + "hoa/console": "~3.16|~2.15" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", @@ -2574,7 +1878,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "0.9.x-dev" + "dev-master": "0.10.x-dev" } }, "autoload": { @@ -2604,7 +1908,7 @@ "interactive", "shell" ], - "time": "2019-12-06T14:19:43+00:00" + "time": "2020-03-21T06:55:27+00:00" }, { "name": "ralouphie/getallheaders", @@ -2646,55 +1950,125 @@ "description": "A polyfill for getallheaders.", "time": "2019-03-08T08:55:37+00:00" }, + { + "name": "ramsey/collection", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/ramsey/collection.git", + "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/collection/zipball/925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca", + "reference": "925ad8cf55ba7a3fc92e332c58fd0478ace3e1ca", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", + "fzaninotto/faker": "^1.5", + "jakub-onderka/php-parallel-lint": "^1", + "jangregor/phpstan-prophecy": "^0.6", + "mockery/mockery": "^1.3", + "phpstan/extension-installer": "^1", + "phpstan/phpdoc-parser": "0.4.1", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5", + "slevomat/coding-standard": "^6.0", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ramsey\\Collection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "A PHP 7.2+ library for representing and manipulating collections.", + "homepage": "https://github.com/ramsey/collection", + "keywords": [ + "array", + "collection", + "hash", + "map", + "queue", + "set" + ], + "time": "2020-01-05T00:22:59+00:00" + }, { "name": "ramsey/uuid", - "version": "3.9.3", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92" + "reference": "2c9644b1d0c2bc58732413252bcbb6dce2eb0e0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/7e1633a6964b48589b142d60542f9ed31bd37a92", - "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/2c9644b1d0c2bc58732413252bcbb6dce2eb0e0e", + "reference": "2c9644b1d0c2bc58732413252bcbb6dce2eb0e0e", "shasum": "" }, "require": { + "brick/math": "^0.8", "ext-json": "*", - "paragonie/random_compat": "^1 | ^2 | 9.99.99", - "php": "^5.4 | ^7 | ^8", + "php": "^7.2 || ^8", + "ramsey/collection": "^1.0", "symfony/polyfill-ctype": "^1.8" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^1 | ^2", - "doctrine/annotations": "^1.2", - "goaop/framework": "1.0.0-alpha.2 | ^1 | ^2.1", + "codeception/aspect-mock": "^3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2", + "doctrine/annotations": "^1.8", + "goaop/framework": "^2", "jakub-onderka/php-parallel-lint": "^1", - "mockery/mockery": "^0.9.11 | ^1", + "mockery/mockery": "^1.3", "moontoast/math": "^1.1", "paragonie/random-lib": "^2", - "php-mock/php-mock-phpunit": "^0.3 | ^1.1", - "phpunit/phpunit": "^4.8 | ^5.4 | ^6.5", - "squizlabs/php_codesniffer": "^3.5" + "php-mock/php-mock-mockery": "^1.3", + "php-mock/php-mock-phpunit": "^2.5", + "phpstan/extension-installer": "^1.0", + "phpstan/phpdoc-parser": "0.4.3", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-mockery": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^8.5", + "psy/psysh": "^0.10.0", + "slevomat/coding-standard": "^6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "3.9.4" }, "suggest": { - "ext-ctype": "Provides support for PHP Ctype functions", - "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", - "ext-openssl": "Provides the OpenSSL extension for use with the OpenSslGenerator", - "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", - "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", + "ext-ctype": "Enables faster processing of character classification using ctype functions.", + "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", + "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.x-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -2709,29 +2083,14 @@ "license": [ "MIT" ], - "authors": [ - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - }, - { - "name": "Marijn Huizendveld", - "email": "marijn.huizendveld@gmail.com" - }, - { - "name": "Thibaud Fabre", - "email": "thibaud@aztech.io" - } - ], - "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).", "homepage": "https://github.com/ramsey/uuid", "keywords": [ "guid", "identifier", "uuid" ], - "time": "2020-02-21T04:36:14+00:00" + "time": "2020-03-22T02:34:13+00:00" }, { "name": "spatie/laravel-permission", @@ -3837,70 +3196,6 @@ "homepage": "https://symfony.com", "time": "2020-02-08T17:00:58+00:00" }, - { - "name": "symfony/psr-http-message-bridge", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "ce709cd9c90872c08c2427b45739d5f3c781ab4f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/ce709cd9c90872c08c2427b45739d5f3c781ab4f", - "reference": "ce709cd9c90872c08c2427b45739d5f3c781ab4f", - "shasum": "" - }, - "require": { - "php": "^7.1", - "psr/http-message": "^1.0", - "symfony/http-foundation": "^4.4 || ^5.0" - }, - "require-dev": { - "nyholm/psr7": "^1.1", - "symfony/phpunit-bridge": "^4.4 || ^5.0" - }, - "suggest": { - "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" - }, - "type": "symfony-bridge", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bridge\\PsrHttpMessage\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "PSR HTTP message bridge", - "homepage": "http://symfony.com", - "keywords": [ - "http", - "http-message", - "psr-17", - "psr-7" - ], - "time": "2020-01-02T08:07:11+00:00" - }, { "name": "symfony/routing", "version": "v5.0.5", @@ -4357,16 +3652,16 @@ }, { "name": "voku/portable-ascii", - "version": "1.4.9", + "version": "1.4.10", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "9fd2b224c71448b5f84aef9d499a1428d79776a2" + "reference": "240e93829a5f985fab0984a6e55ae5e26b78a334" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/9fd2b224c71448b5f84aef9d499a1428d79776a2", - "reference": "9fd2b224c71448b5f84aef9d499a1428d79776a2", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/240e93829a5f985fab0984a6e55ae5e26b78a334", + "reference": "240e93829a5f985fab0984a6e55ae5e26b78a334", "shasum": "" }, "require": { @@ -4402,7 +3697,7 @@ "clean", "php" ], - "time": "2020-03-06T02:47:42+00:00" + "time": "2020-03-13T01:23:26+00:00" } ], "packages-dev": [ @@ -4579,16 +3874,16 @@ }, { "name": "facade/ignition", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "b8dbf7791c81619161270d580a64a30bad41b832" + "reference": "67f1677954ad33ca6b77f2c41cf43a58624f27fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/b8dbf7791c81619161270d580a64a30bad41b832", - "reference": "b8dbf7791c81619161270d580a64a30bad41b832", + "url": "https://api.github.com/repos/facade/ignition/zipball/67f1677954ad33ca6b77f2c41cf43a58624f27fc", + "reference": "67f1677954ad33ca6b77f2c41cf43a58624f27fc", "shasum": "" }, "require": { @@ -4610,7 +3905,7 @@ "orchestra/testbench": "5.0" }, "suggest": { - "laravel/telescope": "^2.0" + "laravel/telescope": "^3.1" }, "type": "library", "extra": { @@ -4646,7 +3941,7 @@ "laravel", "page" ], - "time": "2020-03-05T12:32:22+00:00" + "time": "2020-03-18T19:20:44+00:00" }, { "name": "facade/ignition-contracts", diff --git a/config/auth.php b/config/auth.php index 922e5f622..c2f908f0b 100644 --- a/config/auth.php +++ b/config/auth.php @@ -42,7 +42,7 @@ ], 'api' => [ - 'driver' => 'passport', + 'driver' => 'sanctum', 'provider' => 'users', 'hash' => false, ], diff --git a/config/sanctum.php b/config/sanctum.php new file mode 100644 index 000000000..3da87abcc --- /dev/null +++ b/config/sanctum.php @@ -0,0 +1,46 @@ + explode(',', env('SANCTUM_STATEFUL_DOMAINS', 'localhost,127.0.0.1')), + + /* + |-------------------------------------------------------------------------- + | Expiration Minutes + |-------------------------------------------------------------------------- + | + | This value controls the number of minutes until an issued token will be + | considered expired. If this value is null, personal access tokens do + | not expire. This won't tweak the lifetime of first-party sessions. + | + */ + + 'expiration' => null, + + /* + |-------------------------------------------------------------------------- + | Sanctum Middleware + |-------------------------------------------------------------------------- + | + | When authenticating your first-party SPA with Sanctum you may need to + | customize some of the middleware Sanctum uses while processing the + | request. You may change the middleware listed below as required. + | + */ + + 'middleware' => [ + 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, + ], + +]; diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php new file mode 100644 index 000000000..3ce00023a --- /dev/null +++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -0,0 +1,36 @@ +bigIncrements('id'); + $table->morphs('tokenable'); + $table->string('name'); + $table->string('token', 64)->unique(); + $table->text('abilities')->nullable(); + $table->timestamp('last_used_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('personal_access_tokens'); + } +} diff --git a/database/migrations/2020_03_25_170854_remove_passport.php b/database/migrations/2020_03_25_170854_remove_passport.php new file mode 100644 index 000000000..0b98465c4 --- /dev/null +++ b/database/migrations/2020_03_25_170854_remove_passport.php @@ -0,0 +1,32 @@ +", "license": "MIT",