diff --git a/app/Console/Commands/JwtCheck.php b/app/Console/Commands/JwtCheck.php new file mode 100644 index 0000000..6de525f --- /dev/null +++ b/app/Console/Commands/JwtCheck.php @@ -0,0 +1,35 @@ +argument('jwt'); + + $jws = $loader->loadAndVerifyWithKey($jwt, $jwk, $signature); + + if ($this->option('ignore-time-checker')) { + $claimCheckerManager = $claimCheckerManagerFactory->create(['aud', 'iss']); + } else { + $claimCheckerManager = $claimCheckerManagerFactory->create(['aud', 'exp', 'iat', 'iss']); + } + + $claimCheckerManager->check(json_decode($jws->getPayload(), true)); + + return 0; + } +} diff --git a/app/Http/Controllers/Auth/HydraCallback.php b/app/Http/Controllers/Auth/HydraCallback.php index df7ec6b..ad39521 100644 --- a/app/Http/Controllers/Auth/HydraCallback.php +++ b/app/Http/Controllers/Auth/HydraCallback.php @@ -5,13 +5,22 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; +use Jose\Component\Checker\ClaimCheckerManagerFactory; +use Jose\Component\Core\JWK; +use Jose\Component\Signature\JWSLoader; use Ory\Hydra\Client\Api\AdminApi; use Ory\Hydra\Client\Api\PublicApi; class HydraCallback { - public function __invoke(Request $request, PublicApi $hydra, AdminApi $admin) - { + public function __invoke( + Request $request, + PublicApi $hydra, + AdminApi $admin, + JWK $jwk, + JWSLoader $loader, + ClaimCheckerManagerFactory $claimCheckerManagerFactory, + ) { $error = $request->input('error'); if (null !== $error) { @@ -49,6 +58,14 @@ public function __invoke(Request $request, PublicApi $hydra, AdminApi $admin) Log::debug('Token Introspection: ', json_decode((string)$introspectToken, true)); + $idToken = $tokenResponse->getIdToken(); + + $jws = $loader->loadAndVerifyWithKey($idToken, $jwk, $signature); + + $claimCheckerManager = $claimCheckerManagerFactory->create(['aud', 'exp', 'iat', 'iss']); + + $claimCheckerManager->check(json_decode($jws->getPayload(), true)); + return response('拿到身分驗證回應了'); } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index fc13901..7d3f52d 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -3,6 +3,18 @@ namespace App\Providers; use Illuminate\Support\ServiceProvider; +use Jose\Component\Checker\AudienceChecker; +use Jose\Component\Checker\ClaimCheckerManagerFactory; +use Jose\Component\Checker\ExpirationTimeChecker; +use Jose\Component\Checker\IssuedAtChecker; +use Jose\Component\Checker\IssuerChecker; +use Jose\Component\Core\AlgorithmManager; +use Jose\Component\Core\JWK; +use Jose\Component\Signature\Algorithm\RS256; +use Jose\Component\Signature\JWSLoader; +use Jose\Component\Signature\JWSVerifier; +use Jose\Component\Signature\Serializer\CompactSerializer; +use Jose\Component\Signature\Serializer\JWSSerializerManager; use Ory\Hydra\Client\Api\AdminApi; use Ory\Hydra\Client\Api\PublicApi; @@ -30,6 +42,41 @@ public function register() $instance->getConfig()->setHost('http://127.0.0.1:4445'); }); }); + + $this->app->singleton(ClaimCheckerManagerFactory::class, function () { + return tap(new ClaimCheckerManagerFactory(), function (ClaimCheckerManagerFactory $instance) { + $instance->add('aud', new AudienceChecker('my-rp')); + $instance->add('exp', new ExpirationTimeChecker(10)); + $instance->add('iat', new IssuedAtChecker(10)); + $instance->add('iss', new IssuerChecker(['http://127.0.0.1:4444/'])); + }); + }); + + $this->app->singleton(JWSLoader::class, function () { + return new JWSLoader( + new JWSSerializerManager([ + new CompactSerializer(), + ]), + new JWSVerifier(new AlgorithmManager([ + new RS256() + ])), + null, + ); + }); + + // 目前 Key 只有一把,所以先偷懶這樣寫 + $this->app->singleton(JWK::class, function () { + $jwkJson = '{ + "use": "sig", + "kty": "RSA", + "kid": "public:hydra.openid.id-token", + "alg": "RS256", + "n": "3fLBH5AZuoJurOEDA8_MAodU9slUs7AQaeus3C6C7JdSpo7JjgyNMgNV5Fnu53gQlY3Pr5ZyWpfmzJwIFRLrfvT-iQcktXjnZIcFvkX67nAwoUiqBoppprQyTju56ZxrAZnLLr8CYpaDKIjrJkFQw5BWX2X00DIo_YjG_2AJkdlxGuCtFhaUl0VpPr7PmVTxroscagtWdRbb6bitwlkcyc-0ESP2NRIWp2erQ5FJeigPtyGfqSpXUAFbgfz3-koTBpcyf73FRc3BqkuOmAsUJWHl-7s9u8pDK_H9dq-Cg_hWqGohWc_oaA0_01-um647xkMvm4FLA4UH-h1pOiZoL5hyqNGF3FRcBoOLJcFqb4P3zq22sW28dluEEht2_WV3nxAHttHD3Sxbq4uMtjVucBjTwS8x4EVUvipqQ8z-jV386v9bG2xvx6KgUEMyPOsSAYI6ww6HDrlDHBXi1Fr0x7b9bPvlJe9MtLEvFTMe8UgmrcXOJO-xu4EN5HwH6wtnnnsYuw-0duiLL0mvE0AeXZurQy_u_vbh-thkTLkdQFBY93cY3yLcp0sll2FpXSrGNtZddX3x4yIDMQLbYqUzybiVbsohhu7xSYowTX77xIZobGxnuNpbGa857RD9zox9ugSh59Yq9qr4TC2DLAunXQEaalijUjr4sYIV6NCtrRk", + "e": "AQAB" +}'; + + return JWK::createFromJson($jwkJson); + }); } /** diff --git a/composer.json b/composer.json index fd4186f..c35eb13 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ "laravel/framework": "^9.19", "laravel/sanctum": "^3.0", "laravel/tinker": "^2.7", - "ory/hydra-client": "^1.11" + "ory/hydra-client": "^1.11", + "web-token/jwt-framework": "^3.1" }, "require-dev": { "fakerphp/faker": "^1.9.1", diff --git a/composer.lock b/composer.lock index 9bacf91..415dc70 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fa9c2b724da893822456666a987f3239", + "content-hash": "9e00a0b0c626cdbdfc9e8bf5811c681c", "packages": [ { "name": "brick/math", @@ -771,6 +771,81 @@ ], "time": "2022-06-18T20:57:19+00:00" }, + { + "name": "fgrosse/phpasn1", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/fgrosse/PHPASN1.git", + "reference": "eef488991d53e58e60c9554b09b1201ca5ba9296" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/eef488991d53e58e60c9554b09b1201ca5ba9296", + "reference": "eef488991d53e58e60c9554b09b1201ca5ba9296", + "shasum": "" + }, + "require": { + "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "~2.0", + "phpunit/phpunit": "^6.3 || ^7.0 || ^8.0" + }, + "suggest": { + "ext-bcmath": "BCmath is the fallback extension for big integer calculations", + "ext-curl": "For loading OID information from the web if they have not bee defined statically", + "ext-gmp": "GMP is the preferred extension for big integer calculations", + "phpseclib/bcmath_compat": "BCmath polyfill for servers where neither GMP nor BCmath is available" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "FG\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Friedrich Große", + "email": "friedrich.grosse@gmail.com", + "homepage": "https://github.com/FGrosse", + "role": "Author" + }, + { + "name": "All contributors", + "homepage": "https://github.com/FGrosse/PHPASN1/contributors" + } + ], + "description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.", + "homepage": "https://github.com/FGrosse/PHPASN1", + "keywords": [ + "DER", + "asn.1", + "asn1", + "ber", + "binary", + "decoding", + "encoding", + "x.509", + "x.690", + "x509", + "x690" + ], + "support": { + "issues": "https://github.com/fgrosse/PHPASN1/issues", + "source": "https://github.com/fgrosse/PHPASN1/tree/v2.4.0" + }, + "time": "2021-12-11T12:41:06+00:00" + }, { "name": "fruitcake/php-cors", "version": "v1.2.0", @@ -2512,6 +2587,73 @@ ], "time": "2022-05-04T11:13:29+00:00" }, + { + "name": "paragonie/constant_time_encoding", + "version": "v2.6.3", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "58c3f47f650c94ec05a151692652a868995d2938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", + "reference": "58c3f47f650c94ec05a151692652a868995d2938", + "shasum": "" + }, + "require": { + "php": "^7|^8" + }, + "require-dev": { + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "time": "2022-06-14T06:56:20+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.0", @@ -3293,6 +3435,159 @@ ], "time": "2022-09-16T03:22:46+00:00" }, + { + "name": "spomky-labs/aes-key-wrap", + "version": "v7.0.0", + "source": { + "type": "git", + "url": "https://github.com/Spomky-Labs/aes-key-wrap.git", + "reference": "fbeb834b1f83aa8fbdfbd4c12124f71d4c1606ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Spomky-Labs/aes-key-wrap/zipball/fbeb834b1f83aa8fbdfbd4c12124f71d4c1606ae", + "reference": "fbeb834b1f83aa8fbdfbd4c12124f71d4c1606ae", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-openssl": "*", + "php": ">=8.0" + }, + "require-dev": { + "infection/infection": "^0.25.4", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-beberlei-assert": "^1.0", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.0", + "rector/rector": "^0.12.5", + "symplify/easy-coding-standard": "^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "AESKW\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Florent Morselli", + "homepage": "https://github.com/Spomky-Labs/aes-key-wrap/contributors" + } + ], + "description": "AES Key Wrap for PHP.", + "homepage": "https://github.com/Spomky-Labs/aes-key-wrap", + "keywords": [ + "A128KW", + "A192KW", + "A256KW", + "RFC3394", + "RFC5649", + "aes", + "key", + "padding", + "wrap" + ], + "support": { + "issues": "https://github.com/Spomky-Labs/aes-key-wrap/issues", + "source": "https://github.com/Spomky-Labs/aes-key-wrap/tree/v7.0.0" + }, + "funding": [ + { + "url": "https://github.com/Spomky", + "type": "github" + }, + { + "url": "https://www.patreon.com/FlorentMorselli", + "type": "patreon" + } + ], + "time": "2021-12-08T20:36:59+00:00" + }, + { + "name": "symfony/config", + "version": "v6.1.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "a0645dc585d378b73c01115dd7ab9348f7d40c85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/a0645dc585d378b73c01115dd7ab9348f7d40c85", + "reference": "a0645dc585d378b73c01115dd7ab9348f7d40c85", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/filesystem": "^5.4|^6.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<5.4" + }, + "require-dev": { + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/messenger": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "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": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v6.1.3" + }, + "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": "2022-07-20T15:00:40+00:00" + }, { "name": "symfony/console", "version": "v6.1.4", @@ -3454,6 +3749,93 @@ ], "time": "2022-06-27T17:24:16+00:00" }, + { + "name": "symfony/dependency-injection", + "version": "v6.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "b9c797c9d56afc290d4265854bafd01b4e379240" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/b9c797c9d56afc290d4265854bafd01b4e379240", + "reference": "b9c797c9d56afc290d4265854bafd01b4e379240", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/service-contracts": "^1.1.6|^2.0|^3.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2", + "symfony/config": "<6.1", + "symfony/finder": "<5.4", + "symfony/proxy-manager-bridge": "<5.4", + "symfony/yaml": "<5.4" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "symfony/config": "^6.1", + "symfony/expression-language": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "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": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v6.1.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": "2022-09-28T16:00:52+00:00" + }, { "name": "symfony/deprecation-contracts", "version": "v3.1.1", @@ -3754,6 +4136,69 @@ ], "time": "2022-02-25T11:15:52+00:00" }, + { + "name": "symfony/filesystem", + "version": "v6.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "4d216a2beef096edf040a070117c39ca2abce307" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/4d216a2beef096edf040a070117c39ca2abce307", + "reference": "4d216a2beef096edf040a070117c39ca2abce307", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "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": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.1.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": "2022-09-21T20:29:40+00:00" + }, { "name": "symfony/finder", "version": "v6.1.3", @@ -5604,6 +6049,192 @@ ], "time": "2022-03-08T17:03:00+00:00" }, + { + "name": "web-token/jwt-framework", + "version": "3.1.2", + "source": { + "type": "git", + "url": "https://github.com/web-token/jwt-framework.git", + "reference": "c8d3a304855844451d1d2d3e6087a6f287cba1d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/web-token/jwt-framework/zipball/c8d3a304855844451d1d2d3e6087a6f287cba1d9", + "reference": "c8d3a304855844451d1d2d3e6087a6f287cba1d9", + "shasum": "" + }, + "require": { + "brick/math": "^0.9|^0.10", + "ext-json": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-sodium": "*", + "fgrosse/phpasn1": "^2.0", + "paragonie/constant_time_encoding": "^2.4", + "php": ">=8.1", + "psr/event-dispatcher": "^1.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "spomky-labs/aes-key-wrap": "^7.0", + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/polyfill-mbstring": "^1.12" + }, + "conflict": { + "spomky-labs/jose": "*" + }, + "replace": { + "web-token/encryption-pack": "self.version", + "web-token/jwt-bundle": "self.version", + "web-token/jwt-checker": "self.version", + "web-token/jwt-console": "self.version", + "web-token/jwt-core": "self.version", + "web-token/jwt-encryption": "self.version", + "web-token/jwt-encryption-algorithm-aescbc": "self.version", + "web-token/jwt-encryption-algorithm-aesgcm": "self.version", + "web-token/jwt-encryption-algorithm-aesgcmkw": "self.version", + "web-token/jwt-encryption-algorithm-aeskw": "self.version", + "web-token/jwt-encryption-algorithm-dir": "self.version", + "web-token/jwt-encryption-algorithm-ecdh-es": "self.version", + "web-token/jwt-encryption-algorithm-experimental": "self.version", + "web-token/jwt-encryption-algorithm-pbes2": "self.version", + "web-token/jwt-encryption-algorithm-rsa": "self.version", + "web-token/jwt-key-mgmt": "self.version", + "web-token/jwt-nested-token": "self.version", + "web-token/jwt-signature": "self.version", + "web-token/jwt-signature-algorithm-ecdsa": "self.version", + "web-token/jwt-signature-algorithm-eddsa": "self.version", + "web-token/jwt-signature-algorithm-experimental": "self.version", + "web-token/jwt-signature-algorithm-hmac": "self.version", + "web-token/jwt-signature-algorithm-none": "self.version", + "web-token/jwt-signature-algorithm-rsa": "self.version", + "web-token/jwt-util-ecc": "self.version", + "web-token/signature-pack": "self.version" + }, + "require-dev": { + "bjeavons/zxcvbn-php": "^1.3", + "blackfire/php-sdk": "^1.31", + "ekino/phpstan-banned-code": "^1.0", + "ext-curl": "*", + "ext-gmp": "*", + "infection/infection": "^0.26", + "matthiasnoback/symfony-config-test": "^4.3.0", + "nyholm/psr7": "^1.5", + "php-http/mock-client": "^1.5", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.4", + "phpunit/phpunit": "^9.5.23", + "rector/rector": "^0.14", + "roave/security-advisories": "dev-latest", + "symfony/browser-kit": "^6.1.3", + "symfony/finder": "^5.4|^6.0", + "symfony/framework-bundle": "^6.1.3", + "symfony/http-client": "^5.4|^6.0", + "symfony/phpunit-bridge": "^6.1.3", + "symfony/serializer": "^6.1.3", + "symfony/var-dumper": "^6.1.3", + "symfony/yaml": "^6.1.3", + "symplify/easy-coding-standard": "^11.0" + }, + "suggest": { + "bjeavons/zxcvbn-php": "Adds key quality check for oct keys.", + "ext-sodium": "Sodium is required for OKP key creation, EdDSA signature algorithm and ECDH-ES key encryption with OKP keys", + "php-http/httplug": "To enable JKU/X5U support.", + "php-http/httplug-bundle": "To enable JKU/X5U support.", + "php-http/message-factory": "To enable JKU/X5U support.", + "symfony/serializer": "Use the Symfony serializer to serialize/unserialize JWS and JWE tokens.", + "symfony/var-dumper": "Used to show data on the debug toolbar." + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Jose\\": "src/", + "Jose\\Component\\Core\\Util\\Ecc\\": [ + "src/Ecc" + ], + "Jose\\Component\\Signature\\Algorithm\\": [ + "src/SignatureAlgorithm/ECDSA", + "src/SignatureAlgorithm/EdDSA", + "src/SignatureAlgorithm/HMAC", + "src/SignatureAlgorithm/None", + "src/SignatureAlgorithm/RSA", + "src/SignatureAlgorithm/Experimental" + ], + "Jose\\Component\\Encryption\\Algorithm\\": [ + "src/EncryptionAlgorithm/Experimental" + ], + "Jose\\Component\\Encryption\\Algorithm\\KeyEncryption\\": [ + "src/EncryptionAlgorithm/KeyEncryption/AESGCMKW", + "src/EncryptionAlgorithm/KeyEncryption/AESKW", + "src/EncryptionAlgorithm/KeyEncryption/Direct", + "src/EncryptionAlgorithm/KeyEncryption/ECDHES", + "src/EncryptionAlgorithm/KeyEncryption/PBES2", + "src/EncryptionAlgorithm/KeyEncryption/RSA" + ], + "Jose\\Component\\Encryption\\Algorithm\\ContentEncryption\\": [ + "src/EncryptionAlgorithm/ContentEncryption/AESGCM", + "src/EncryptionAlgorithm/ContentEncryption/AESCBC" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Florent Morselli", + "homepage": "https://github.com/Spomky" + }, + { + "name": "All contributors", + "homepage": "https://github.com/web-token/jwt-framework/contributors" + } + ], + "description": "JSON Object Signing and Encryption library for PHP and Symfony Bundle.", + "homepage": "https://github.com/web-token/jwt-framework", + "keywords": [ + "JOSE", + "JWE", + "JWK", + "JWKSet", + "JWS", + "Jot", + "RFC7515", + "RFC7516", + "RFC7517", + "RFC7518", + "RFC7519", + "RFC7520", + "bundle", + "jwa", + "jwt", + "symfony" + ], + "support": { + "issues": "https://github.com/web-token/jwt-framework/issues", + "source": "https://github.com/web-token/jwt-framework/tree/3.1.2" + }, + "funding": [ + { + "url": "https://github.com/Spomky", + "type": "github" + }, + { + "url": "https://www.patreon.com/FlorentMorselli", + "type": "patreon" + } + ], + "time": "2022-09-01T05:50:30+00:00" + }, { "name": "webmozart/assert", "version": "1.11.0",