├── .github ├── FUNDING.yml ├── dependabot.yml ├── stale.yml ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── workflows │ ├── bc-break-test.yml │ ├── static-analyze.yml │ ├── coding-standards.yml │ ├── unit-tests.yml │ └── functional-tests.yml ├── src ├── Easy │ ├── .github │ │ ├── FUNDING.yml │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ └── CONTRIBUTING.md │ ├── README.md │ ├── Build.php │ ├── Load.php │ ├── JWT.php │ └── LICENSE ├── Ecc │ ├── .github │ │ ├── FUNDING.yml │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ └── CONTRIBUTING.md │ ├── README.md │ ├── ModularArithmetic.php │ ├── composer.json │ └── LICENSE ├── Component │ ├── Core │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ ├── JWT.php │ │ ├── Algorithm.php │ │ └── composer.json │ ├── Checker │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── ClaimExceptionInterface.php │ │ ├── README.md │ │ ├── ClaimChecker.php │ │ ├── composer.json │ │ ├── MissingMandatoryClaimException.php │ │ ├── MissingMandatoryHeaderParameterException.php │ │ └── HeaderChecker.php │ ├── Console │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ ├── ObjectOutputCommand.php │ │ └── composer.json │ ├── Encryption │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ ├── Algorithm │ │ │ ├── KeyEncryption │ │ │ │ ├── DirectEncryption.php │ │ │ │ └── KeyAgreement.php │ │ │ └── KeyEncryptionAlgorithm.php │ │ └── Compression │ │ │ └── CompressionMethod.php │ ├── Signature │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ ├── Serializer │ │ │ ├── Serializer.php │ │ │ └── JWSSerializer.php │ │ ├── Algorithm │ │ │ ├── MacAlgorithm.php │ │ │ └── SignatureAlgorithm.php │ │ └── JWSVerifierFactory.php │ ├── KeyManagement │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ └── Analyzer │ │ │ ├── KeyAnalyzer.php │ │ │ ├── KeysetAnalyzer.php │ │ │ ├── AlgorithmAnalyzer.php │ │ │ ├── KeyIdentifierAnalyzer.php │ │ │ ├── NoneAnalyzer.php │ │ │ ├── OctAnalyzer.php │ │ │ ├── HS256KeyAnalyzer.php │ │ │ ├── HS384KeyAnalyzer.php │ │ │ └── HS512KeyAnalyzer.php │ └── NestedToken │ │ ├── .github │ │ ├── FUNDING.yml │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ └── composer.json ├── SignatureAlgorithm │ ├── ECDSA │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ ├── ES256.php │ │ ├── ES384.php │ │ ├── ES512.php │ │ └── composer.json │ ├── EdDSA │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ └── composer.json │ ├── HMAC │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ ├── composer.json │ │ ├── HS256.php │ │ ├── HS384.php │ │ └── HS512.php │ ├── None │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ └── composer.json │ ├── RSA │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── PS256.php │ │ ├── PS384.php │ │ ├── PS512.php │ │ ├── README.md │ │ ├── RS256.php │ │ ├── RS384.php │ │ └── RS512.php │ └── Experimental │ │ ├── .github │ │ ├── FUNDING.yml │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ └── CONTRIBUTING.md │ │ ├── HS1.php │ │ ├── RS1.php │ │ ├── README.md │ │ ├── ES256K.php │ │ ├── HS256_64.php │ │ └── composer.json ├── EncryptionAlgorithm │ ├── Experimental │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── KeyEncryption │ │ │ ├── A128CTR.php │ │ │ ├── A192CTR.php │ │ │ ├── A256CTR.php │ │ │ ├── RSAOAEP384.php │ │ │ └── RSAOAEP512.php │ │ ├── README.md │ │ ├── ContentEncryption │ │ │ ├── A128CCM_64_64.php │ │ │ ├── A256CCM_64_64.php │ │ │ ├── A128CCM_16_128.php │ │ │ ├── A128CCM_16_64.php │ │ │ ├── A128CCM_64_128.php │ │ │ ├── A256CCM_16_128.php │ │ │ ├── A256CCM_16_64.php │ │ │ └── A256CCM_64_128.php │ │ └── composer.json │ ├── KeyEncryption │ │ ├── AESKW │ │ │ ├── .github │ │ │ │ ├── FUNDING.yml │ │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ │ └── CONTRIBUTING.md │ │ │ ├── README.md │ │ │ ├── A128KW.php │ │ │ ├── A192KW.php │ │ │ ├── A256KW.php │ │ │ └── composer.json │ │ ├── Direct │ │ │ ├── .github │ │ │ │ ├── FUNDING.yml │ │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ │ └── CONTRIBUTING.md │ │ │ ├── README.md │ │ │ └── composer.json │ │ ├── ECDHES │ │ │ ├── .github │ │ │ │ ├── FUNDING.yml │ │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ │ └── CONTRIBUTING.md │ │ │ ├── README.md │ │ │ ├── ECDHESA128KW.php │ │ │ ├── ECDHESA192KW.php │ │ │ └── ECDHESA256KW.php │ │ ├── PBES2 │ │ │ ├── .github │ │ │ │ ├── FUNDING.yml │ │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ │ └── CONTRIBUTING.md │ │ │ ├── README.md │ │ │ ├── PBES2HS256A128KW.php │ │ │ ├── PBES2HS384A192KW.php │ │ │ ├── PBES2HS512A256KW.php │ │ │ └── composer.json │ │ ├── RSA │ │ │ ├── .github │ │ │ │ ├── FUNDING.yml │ │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ │ └── CONTRIBUTING.md │ │ │ ├── README.md │ │ │ ├── RSA15.php │ │ │ ├── RSAOAEP.php │ │ │ └── RSAOAEP256.php │ │ └── AESGCMKW │ │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ │ ├── A128GCMKW.php │ │ │ ├── A192GCMKW.php │ │ │ ├── A256GCMKW.php │ │ │ ├── README.md │ │ │ └── composer.json │ └── ContentEncryption │ │ ├── AESCBC │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ ├── A128CBCHS256.php │ │ ├── A192CBCHS384.php │ │ ├── A256CBCHS512.php │ │ └── composer.json │ │ └── AESGCM │ │ ├── .github │ │ ├── FUNDING.yml │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ └── CONTRIBUTING.md │ │ ├── README.md │ │ ├── A128GCM.php │ │ ├── A192GCM.php │ │ ├── A256GCM.php │ │ └── composer.json └── Bundle │ └── JoseFramework │ ├── .github │ ├── FUNDING.yml │ ├── PULL_REQUEST_TEMPLATE.md │ ├── CONTRIBUTING.md │ └── stale.yml │ ├── Resources │ ├── views │ │ └── data_collector │ │ │ └── tab │ │ │ ├── key.html.twig │ │ │ ├── claim_checker.html.twig │ │ │ ├── header_checker.html.twig │ │ │ ├── jws.html.twig │ │ │ ├── jwe.html.twig │ │ │ ├── jwe │ │ │ ├── compression_methods.html.twig │ │ │ └── serialization_modes.html.twig │ │ │ └── jws │ │ │ └── serialization_modes.html.twig │ └── config │ │ ├── routing │ │ └── jwkset_controller.php │ │ ├── env_var.php │ │ ├── jwk_factory.php │ │ ├── services.php │ │ ├── jku_commands.php │ │ ├── Algorithms │ │ ├── signature_none.php │ │ ├── signature_eddsa.php │ │ ├── encryption_dir.php │ │ ├── signature_ecdsa.php │ │ ├── signature_hmac.php │ │ ├── encryption_aeskw.php │ │ ├── encryption_rsa.php │ │ ├── encryption_aesgcm.php │ │ ├── encryption_aesgcmkw.php │ │ ├── encryption_experimental_chacha20_poly1305.php │ │ └── encryption_aescbc.php │ │ ├── jwkset_sources.php │ │ ├── nested_token.php │ │ ├── jwk_services.php │ │ ├── compression_methods.php │ │ ├── jws_serializers.php │ │ ├── jwe_serializers.php │ │ ├── jwe_services.php │ │ ├── jws_services.php │ │ └── jwk_sources.php │ ├── README.md │ ├── DataCollector │ └── Collector.php │ ├── Controller │ ├── JWKSetControllerFactory.php │ └── JWKSetController.php │ ├── DependencyInjection │ ├── Source │ │ ├── SourceWithCompilerPasses.php │ │ └── Source.php │ └── Compiler │ │ └── EventDispatcherAliasCompilerPass.php │ └── Event │ ├── JWEBuiltSuccessEvent.php │ ├── JWSBuiltSuccessEvent.php │ ├── NestedTokenIssuedEvent.php │ └── JWEDecryptionFailureEvent.php ├── packs ├── encryption │ ├── .github │ │ ├── FUNDING.yml │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ └── CONTRIBUTING.md │ └── composer.json └── signature │ ├── .github │ ├── FUNDING.yml │ ├── PULL_REQUEST_TEMPLATE.md │ └── CONTRIBUTING.md │ └── composer.json ├── tests ├── Component │ ├── Console │ │ └── Sample │ │ │ ├── CertRSA.p12 │ │ │ ├── private.es512.encrypted.key │ │ │ └── 2048b-rsa-example-cert.pem │ ├── KeyManagement │ │ ├── P12 │ │ │ └── CertRSA.p12 │ │ ├── RSA │ │ │ ├── frank4dd-cacert.der │ │ │ ├── DER │ │ │ │ ├── 16k-rsa-example-cert.der │ │ │ │ ├── 32k-rsa-example-cert.der │ │ │ │ ├── 512b-rsa-example-cert.der │ │ │ │ ├── 1024b-rsa-example-cert.der │ │ │ │ ├── 2048b-rsa-example-cert.der │ │ │ │ ├── 4096b-rsa-example-cert.der │ │ │ │ └── 8192b-rsa-example-cert.der │ │ │ └── PEM │ │ │ │ ├── 512b-rsa-example-cert.pem │ │ │ │ └── 1024b-rsa-example-cert.pem │ │ ├── EC │ │ │ ├── DER │ │ │ │ ├── prime256v1-cert.der │ │ │ │ └── 570-ec-sect571r1-cert.der │ │ │ └── PEM │ │ │ │ ├── prime256v1-cert.pem │ │ │ │ └── 570-ec-sect571r1-cert.pem │ │ ├── Keys │ │ │ ├── ED │ │ │ │ ├── public-X25519.pem │ │ │ │ ├── public-ed25519.pem │ │ │ │ ├── private-X25519.pem │ │ │ │ ├── private-ed25519.pem │ │ │ │ ├── public-X448.pem │ │ │ │ ├── public-ed448.pem │ │ │ │ ├── private-X448.pem │ │ │ │ └── private-ed448.pem │ │ │ ├── EC │ │ │ │ ├── public.es256.key │ │ │ │ ├── public.es384.key │ │ │ │ ├── private.es256.key │ │ │ │ ├── private.es256.from.APN.key │ │ │ │ ├── public.es512.key │ │ │ │ ├── private.es384.key │ │ │ │ ├── private.es256.encrypted.key │ │ │ │ ├── private.es512.key │ │ │ │ ├── private.es384.encrypted.key │ │ │ │ └── private.es512.encrypted.key │ │ │ ├── RSA │ │ │ │ ├── low_exponent.pem │ │ │ │ ├── public-ne.key │ │ │ │ ├── public.key │ │ │ │ └── private.key │ │ │ └── DSA │ │ │ │ └── DSA.key │ │ └── FooAlgorithm.php │ └── Core │ │ ├── FooAlgorithm.php │ │ └── JsonConverterTest.php ├── Bundle │ └── JoseFramework │ │ ├── config │ │ └── routing.yml │ │ └── TestBundle │ │ ├── Resources │ │ └── config │ │ │ ├── services.yml │ │ │ └── services.php │ │ ├── TestBundle.php │ │ └── Service │ │ └── MockClientCallback.php └── Easy │ └── ParameterBagTest.php ├── infection.json └── LICENSE /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: Spomky 2 | -------------------------------------------------------------------------------- /src/Easy/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/Ecc/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /packs/encryption/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /packs/signature/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/Component/Core/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/Component/Checker/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/Component/Console/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/Component/Encryption/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/Component/Signature/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/Component/KeyManagement/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/Component/NestedToken/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/ECDSA/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/EdDSA/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/HMAC/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/None/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/RSA/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/Experimental/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/Experimental/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: Spomky 2 | patreon: FlorentMorselli 3 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/AESKW/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/Direct/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/ECDHES/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/PBES2/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/RSA/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/ContentEncryption/AESCBC/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/ContentEncryption/AESGCM/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/AESGCMKW/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | patreon: FlorentMorselli 2 | -------------------------------------------------------------------------------- /tests/Component/Console/Sample/CertRSA.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/Console/Sample/CertRSA.p12 -------------------------------------------------------------------------------- /tests/Component/KeyManagement/P12/CertRSA.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/KeyManagement/P12/CertRSA.p12 -------------------------------------------------------------------------------- /tests/Component/KeyManagement/RSA/frank4dd-cacert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/KeyManagement/RSA/frank4dd-cacert.der -------------------------------------------------------------------------------- /tests/Component/KeyManagement/EC/DER/prime256v1-cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/KeyManagement/EC/DER/prime256v1-cert.der -------------------------------------------------------------------------------- /tests/Bundle/JoseFramework/config/routing.yml: -------------------------------------------------------------------------------- 1 | jwkset_endpoint: 2 | resource: "@JoseFrameworkBundle/Resources/config/routing/jwkset_controller.php" 3 | prefix: '/keys' 4 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/EC/DER/570-ec-sect571r1-cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/KeyManagement/EC/DER/570-ec-sect571r1-cert.der -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/ED/public-X25519.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MCowBQYDK2VuAyEA3OJLiffmOCQGtil23QGyn0nk9EBKoZx6P+6o+EnsBB4= 3 | -----END PUBLIC KEY----- 4 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/ED/public-ed25519.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MCowBQYDK2VwAyEAwrI33AEj15KHHYplueUE5cnJKtbM8oVHFf6wGnw2oOE= 3 | -----END PUBLIC KEY----- 4 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/RSA/DER/16k-rsa-example-cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/KeyManagement/RSA/DER/16k-rsa-example-cert.der -------------------------------------------------------------------------------- /tests/Component/KeyManagement/RSA/DER/32k-rsa-example-cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/KeyManagement/RSA/DER/32k-rsa-example-cert.der -------------------------------------------------------------------------------- /tests/Component/KeyManagement/RSA/DER/512b-rsa-example-cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/KeyManagement/RSA/DER/512b-rsa-example-cert.der -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/ED/private-X25519.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MC4CAQAwBQYDK2VuBCIEIJhvn4A8JK+fIcCHqgkCmW0fBynmOMoPwM71Os8jWlVB 3 | -----END PRIVATE KEY----- 4 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/ED/private-ed25519.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MC4CAQAwBQYDK2VwBCIEID6/QMWYrwfs0qvecC62X2Guw0N01D6mU5D/9MN96963 3 | -----END PRIVATE KEY----- 4 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/RSA/DER/1024b-rsa-example-cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/KeyManagement/RSA/DER/1024b-rsa-example-cert.der -------------------------------------------------------------------------------- /tests/Component/KeyManagement/RSA/DER/2048b-rsa-example-cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/KeyManagement/RSA/DER/2048b-rsa-example-cert.der -------------------------------------------------------------------------------- /tests/Component/KeyManagement/RSA/DER/4096b-rsa-example-cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/KeyManagement/RSA/DER/4096b-rsa-example-cert.der -------------------------------------------------------------------------------- /tests/Component/KeyManagement/RSA/DER/8192b-rsa-example-cert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/jwt-framework/v2.2/tests/Component/KeyManagement/RSA/DER/8192b-rsa-example-cert.der -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: composer 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "11:00" 8 | open-pull-requests-limit: 10 9 | -------------------------------------------------------------------------------- /src/Easy/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/Ecc/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /packs/encryption/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /packs/signature/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/Component/Core/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/ED/public-X448.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MEIwBQYDK2VvAzkAUoPD73NQACC8A+otDUVun4IrMsk775ShMRf4ThDrq4xY2eAI 3 | +pOIVujrvBXXd9g8gUNwBT0fmnc= 4 | -----END PUBLIC KEY----- 5 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/ED/public-ed448.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MEMwBQYDK2VxAzoAwwHKDV7s4fBhmFSTzYorlaToGXNcsa7SakZdekT/sexD5ENj 3 | 5lWP6/KX9/u++w/QSm80rNOodj0A 4 | -----END PUBLIC KEY----- 5 | -------------------------------------------------------------------------------- /src/Component/Checker/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/Component/Console/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/Component/Signature/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/ED/private-X448.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MEYCAQAwBQYDK2VvBDoEODh2StBafTAAJpNMmXpIgJAfKsaQlQBeHU9sf8ZhTQ3Q 3 | k58g74sWomdDUkaQHUefbQOjiZjhX23J 4 | -----END PRIVATE KEY----- 5 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/Component/Encryption/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/Component/KeyManagement/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/Component/NestedToken/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/ECDSA/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/EdDSA/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/HMAC/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/None/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/RSA/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/ED/private-ed448.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MEcCAQAwBQYDK2VxBDsEOdBl0mzSzoezUAZcKBfMtliZo3j+T7on+PyS+IoRVM0S 3 | 62/96+HB/Jfx1iQPtn32OtixAf6M7HoRuQ== 4 | -----END PRIVATE KEY----- 5 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/Experimental/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/Experimental/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/AESKW/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/PBES2/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/RSA/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/ContentEncryption/AESCBC/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/ContentEncryption/AESGCM/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/AESGCMKW/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/Direct/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/ECDHES/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please do not submit any Pull Requests here. It will be automatically closed. 2 | 3 | You should submit it here: https://github.com/web-token/jwt-framework/pulls 4 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/EC/public.es256.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEvuYsP+QnrqAbM7Iyhzjt08hFSuza 3 | pyojCB/gFsBt65Wir4TYr5fSQ96oa4qeGVeTFzl+fGiZFILootvLsiPwAQ== 4 | -----END PUBLIC KEY----- 5 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/RSA/low_exponent.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MGECAQACEQCy/aCKGshlpPi2TFvQHvQDAgEDAhB3U8BcEdrubN1k06S5LCdLAgkA 3 | 4Kz0hhYYddkCCQDL8hpepERDOwIJAJXIowQOuvk7AgkAh/a8PxgtgicCCGHoV8yc 4 | zeW8 5 | -----END RSA PRIVATE KEY----- -------------------------------------------------------------------------------- /src/Easy/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/Ecc/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /packs/encryption/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /packs/signature/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/Component/Core/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/Component/Checker/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/Component/Console/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/Component/Encryption/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/Component/Signature/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/Component/KeyManagement/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/Component/NestedToken/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/ECDSA/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/EdDSA/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/HMAC/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/None/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/RSA/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/EC/public.es384.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE6f+XZsg2Tvn0EoEapQ+ylMYNtsm8CPf0 3 | cb8HI2EkfY9Bqpt3QMzwlM7mVsFRmaMZb8nOnRwmpmEnvA2U8ydS+dbnPv7bwYl+ 4 | q1qNeh8Wpjor3VO+RTt4ce0Pn25oGGWU 5 | -----END PUBLIC KEY----- 6 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/Experimental/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/Experimental/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/EC/private.es256.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIKv1ZMzZ8Uxt/YxwdKpMAP0nlV7ne8gh0+5G+5Gb/tMUoAoGCCqGSM49 3 | AwEHoUQDQgAEvuYsP+QnrqAbM7Iyhzjt08hFSuzapyojCB/gFsBt65Wir4TYr5fS 4 | Q96oa4qeGVeTFzl+fGiZFILootvLsiPwAQ== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/AESKW/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/Direct/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/ECDHES/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/PBES2/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/RSA/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/ContentEncryption/AESCBC/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/ContentEncryption/AESGCM/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/AESGCMKW/.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 4 | Please do not submit any Pull Requests here. It will be automatically closed. 5 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/EC/private.es256.from.APN.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQg13n3isfsEktzl+CtH5ECpRrKk+40prVuCbldkP77gamgCgYIKoZIzj0DAQehRANCAARhwgxSRqXBt54BWRQXoU/doFWULOWrER3uLS43/iugDW1PMDliQZEzWetYAdf+Mafq/PrlbEAfA+l7JfmijAsv 3 | -----END PRIVATE KEY----- 4 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/.github/stale.yml: -------------------------------------------------------------------------------- 1 | daysUntilStale: 60 2 | daysUntilClose: 7 3 | staleLabel: wontfix 4 | markComment: > 5 | This issue has been automatically marked as stale because it has not had 6 | recent activity. It will be closed if no further activity occurs. Thank you 7 | for your contributions. 8 | closeComment: false 9 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/EC/public.es512.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBWm+jtMalCTk/tkujSqQGlpP58UO/ 3 | odCtYSUEozFysl3+ZE1qnB4BOxW/zdg43iVMghFfOAaSZZ6psOvpFA77VxIAiz4y 4 | hGYtqI/IbbGY/BAIdfYIZf+4JmJPeI7FMAkRm5Rt5IDzbwrhZ8ADg4N0aIHzthVK 5 | GE86SJCzBXculuk8aEI= 6 | -----END PUBLIC KEY----- 7 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/RSA/public-ne.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDfdZEMQbms3t1oyAjY3kfxw/BN 3 | 5A86fPfi4bZ97TIrIeMkMYTZegRJGm7kt6VI91gz+vgBYwVagNY937vFqru4USQz 4 | xzrNpAiCPi4SKr6kEy8f57zTlIVtg4pip9B7h55cCTg6tDBxSRKuUayR/phRrD/c 5 | jBs+DMQNOBNkVW1CUQIDAQAB 6 | -----END PUBLIC KEY----- 7 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/EC/private.es384.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MIGkAgEBBDClxJJett5kQ5oEizsjCpxT0z844zzVeFm44egaCZL/Y90QLBx1BxfO 3 | /tbz6VgvRyugBwYFK4EEACKhZANiAATp/5dmyDZO+fQSgRqlD7KUxg22ybwI9/Rx 4 | vwcjYSR9j0Gqm3dAzPCUzuZWwVGZoxlvyc6dHCamYSe8DZTzJ1L51uc+/tvBiX6r 5 | Wo16HxamOivdU75FO3hx7Q+fbmgYZZQ= 6 | -----END EC PRIVATE KEY----- 7 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/views/data_collector/tab/key.html.twig: -------------------------------------------------------------------------------- 1 |
2 |

Keys and Key Sets

3 |
4 | {% include '@JoseFramework/data_collector/tab/keys/jwk.html.twig' %} 5 | {% include '@JoseFramework/data_collector/tab/keys/jwkset.html.twig' %} 6 |
7 |
8 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | daysUntilStale: 60 2 | daysUntilClose: 7 3 | exemptLabels: 4 | - pinned 5 | - security 6 | staleLabel: wontfix 7 | markComment: > 8 | This issue has been automatically marked as stale because it has not had 9 | recent activity. It will be closed if no further activity occurs. Thank you 10 | for your contributions. 11 | closeComment: false -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/EC/private.es256.encrypted.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | Proc-Type: 4,ENCRYPTED 3 | DEK-Info: DES-EDE3-CBC,6FEEE4AC908B9AF8 4 | 5 | qH00iRhErXsiHjn9hMfNjg2p6LilnqvsuGqf7+Euja8WsE2pkk7Me9H/t7ivj0sC 6 | wA4ndN4McP+0G5TH4n2j3pEgXrLto4Ppq6rRrTgKX2U5kHtwAoQZ+AzFMGtwDuPn 7 | JIJTE0Hnuxnj95g2uTwN8EjRo3Fi4JkHBeRPVnQ5t5g= 8 | -----END EC PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/views/data_collector/tab/claim_checker.html.twig: -------------------------------------------------------------------------------- 1 |
2 |

Claim Checkers

3 |
4 | {% include '@JoseFramework/data_collector/tab/claim_checker/managers.html.twig' %} 5 | {% include '@JoseFramework/data_collector/tab/claim_checker/checkers.html.twig' %} 6 |
7 |
8 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/views/data_collector/tab/header_checker.html.twig: -------------------------------------------------------------------------------- 1 |
2 |

Header Checkers

3 |
4 | {% include '@JoseFramework/data_collector/tab/header_checker/managers.html.twig' %} 5 | {% include '@JoseFramework/data_collector/tab/header_checker/checkers.html.twig' %} 6 |
7 |
8 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/EC/private.es512.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MIHbAgEBBEEWnooUpGIch1H/s8/ZUrHPo6RL+mHKhCrDO/Yjz37zM/tBJyvHmvwY 3 | Utw3mYII0m3es3dIiAjheghBs14+UCPq8aAHBgUrgQQAI6GBiQOBhgAEAVpvo7TG 4 | pQk5P7ZLo0qkBpaT+fFDv6HQrWElBKMxcrJd/mRNapweATsVv83YON4lTIIRXzgG 5 | kmWeqbDr6RQO+1cSAIs+MoRmLaiPyG2xmPwQCHX2CGX/uCZiT3iOxTAJEZuUbeSA 6 | 828K4WfAA4ODdGiB87YVShhPOkiQswV3LpbpPGhC 7 | -----END EC PRIVATE KEY----- 8 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/EC/private.es384.encrypted.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | Proc-Type: 4,ENCRYPTED 3 | DEK-Info: DES-EDE3-CBC,7B09EB9C7013703C 4 | 5 | IaMtFOiyDnsuXuFYqZpYFbSAXRJeJ2DV7wcnAm7NepnB6J9ri/oNUMd/5UuOThf0 6 | vI5ZnBFUJBFvG8OYkOkk3xJrpCrdn9z8CuN9YkPq/Uk17DDlHxfpoDq26sUWQM3D 7 | aJeKFZn6Qab9ouNLkfzhO9XwA2RA43GFk/smY9B2uvqqICwdzqw/GZOw5EsO3HAP 8 | /1iWtEmG1UGwAUdCpqam4kO3aOYFKPT/ 9 | -----END EC PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /tests/Component/Console/Sample/private.es512.encrypted.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | Proc-Type: 4,ENCRYPTED 3 | DEK-Info: DES-EDE3-CBC,F539876D8E68280C 4 | 5 | WNyxoRSZZse8KOb6kVylZJQGOt+prEGGGWXk1ZIUhbOMyqZeMw3dA6KZpUIAsNkJ 6 | th7pZE+nXAqryprcJFkczCdsKaghApGkAOr2LJ7EIZAKx7zHchulvjEmDQG3VBX7 7 | m9nBvgStbSk+6vAaV2G5Zz0IHOo48OraW6gQSE4leYsgKP5Voc8MSOLLbNZXc2jJ 8 | 9gUp9jUwo2Vs7nf2kmqr5eFYYgDCviVFmrqn2sne5Cr8zmmpjlWg+JPebnO7ejbi 9 | V3P1nKBOojV9vb7RmXBq8TDRXrXKdAoLX22Tr0p/QSU= 10 | -----END EC PRIVATE KEY----- 11 | -------------------------------------------------------------------------------- /tests/Bundle/JoseFramework/TestBundle/Resources/config/services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | _defaults: 3 | autowire: true 4 | autoconfigure: true 5 | public: true 6 | 7 | Jose\Tests\Bundle\JoseFramework\TestBundle\Converter\CustomJsonConverter: ~ 8 | Jose\Tests\Bundle\JoseFramework\TestBundle\Checker\CustomChecker: 9 | public: false 10 | tags: 11 | - { name: 'jose.checker.header', alias: 'custom_checker' } 12 | - { name: 'jose.checker.claim', alias: 'custom_checker' } -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/EC/private.es512.encrypted.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | Proc-Type: 4,ENCRYPTED 3 | DEK-Info: DES-EDE3-CBC,F539876D8E68280C 4 | 5 | WNyxoRSZZse8KOb6kVylZJQGOt+prEGGGWXk1ZIUhbOMyqZeMw3dA6KZpUIAsNkJ 6 | th7pZE+nXAqryprcJFkczCdsKaghApGkAOr2LJ7EIZAKx7zHchulvjEmDQG3VBX7 7 | m9nBvgStbSk+6vAaV2G5Zz0IHOo48OraW6gQSE4leYsgKP5Voc8MSOLLbNZXc2jJ 8 | 9gUp9jUwo2Vs7nf2kmqr5eFYYgDCviVFmrqn2sne5Cr8zmmpjlWg+JPebnO7ejbi 9 | V3P1nKBOojV9vb7RmXBq8TDRXrXKdAoLX22Tr0p/QSU= 10 | -----END EC PRIVATE KEY----- 11 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/RSA/public.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtpS1ZmfVKVP5KofIhMBP 3 | 0tSWc4qlh6fm2lrZSkuKxUjEaWjzZSzs72gEIGxraWusMdoRuV54xsWRyf5KeZT0 4 | S+I5Prle3Idi3gICiO4NwvMk6JwSBcJWwmSLFEKyUSnB2CtfiGc0/5rQCpcEt/Dn 5 | 5iM+BNn7fqpoLIbks8rXKUIj8+qMVqkTXsEKeKinE23t1ykMldsNaaOH+hvGti5J 6 | t2DMnH1JjoXdDXfxvSP/0gjUYb0ektudYFXoA6wekmQyJeImvgx4Myz1I4iHtkY/ 7 | Cp7J4Mn1ejZ6HNmyvoTE/4OuY1uCeYv4UyXFc1s1uUyYtj4z57qsHGsS4dQ3A2MJ 8 | swIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /src/Component/Checker/ClaimExceptionInterface.php: -------------------------------------------------------------------------------- 1 | import('.', 'jwkset') 19 | ->methods(['GET']) 20 | ; 21 | }; 22 | -------------------------------------------------------------------------------- /src/Component/KeyManagement/README.md: -------------------------------------------------------------------------------- 1 | PHP JWT Key Management Component 2 | ================================ 3 | 4 | This repository is a sub repository of [the JWT Framework](https://github.com/web-token/jwt-framework) project and is READ ONLY. 5 | 6 | **Please do not submit any Pull Request here.** 7 | You should go to [the main repository](https://github.com/web-token/jwt-framework) instead. 8 | 9 | # Documentation 10 | 11 | The official documentation is available as https://web-token.spomky-labs.com/ 12 | 13 | # Licence 14 | 15 | This software is release under [MIT licence](LICENSE). 16 | -------------------------------------------------------------------------------- /src/Easy/Load.php: -------------------------------------------------------------------------------- 1 | claims = new ParameterBag(); 31 | $this->header = new ParameterBag(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/AESKW/A128KW.php: -------------------------------------------------------------------------------- 1 | 2 |

JWS

3 |
4 | {% include '@JoseFramework/data_collector/tab/jws/builders.html.twig' %} 5 | {% include '@JoseFramework/data_collector/tab/jws/verifiers.html.twig' %} 6 | {% include '@JoseFramework/data_collector/tab/jws/loaders.html.twig' %} 7 | {% include '@JoseFramework/data_collector/tab/jws/signature_algorithms.html.twig' %} 8 | {% include '@JoseFramework/data_collector/tab/jws/mac_algorithms.html.twig' %} 9 | {% include '@JoseFramework/data_collector/tab/jws/serialization_modes.html.twig' %} 10 |
11 | 12 | -------------------------------------------------------------------------------- /src/Component/KeyManagement/Analyzer/AlgorithmAnalyzer.php: -------------------------------------------------------------------------------- 1 | has('alg')) { 23 | $bag->add(Message::medium('The parameter "alg" should be added.')); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/ECDSA/ES256.php: -------------------------------------------------------------------------------- 1 | has('kid')) { 23 | $bag->add(Message::medium('The parameter "kid" should be added.')); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/FooAlgorithm.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(EnvVarProcessor\KeyEnvVarProcessor::class); 25 | }; 26 | -------------------------------------------------------------------------------- /src/Component/Encryption/Algorithm/KeyEncryption/DirectEncryption.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(JWKFactory::class) 25 | ->public() 26 | ; 27 | }; 28 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/EC/PEM/prime256v1-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIB0jCCAXegAwIBAgIJAK2o1kQ5JwpUMAoGCCqGSM49BAMCMEUxCzAJBgNVBAYT 3 | AkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRn 4 | aXRzIFB0eSBMdGQwHhcNMTUxMTA4MTUxMTU2WhcNMTYxMTA3MTUxMTU2WjBFMQsw 5 | CQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJu 6 | ZXQgV2lkZ2l0cyBQdHkgTHRkMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExEsr 7 | /55aqgFXdrbRNz1/WSNI8UaSUxCka2kGEN1bXsJIzjkeyv12dRHo7H5OmY2/Z9sN 8 | fgKhWj7elq0xSlcA0KNQME4wHQYDVR0OBBYEFKIGgCZoS388STT0qjoX/swKYBXh 9 | MB8GA1UdIwQYMBaAFKIGgCZoS388STT0qjoX/swKYBXhMAwGA1UdEwQFMAMBAf8w 10 | CgYIKoZIzj0EAwIDSQAwRgIhAK5OqQoBGR/pj2NOb+PyRKK4k4d3Muj9z/6LsJK+ 11 | kkgUAiEA+FY4SWKv4mfe0gsOBId0Aah/HtVZxDBe3bCXOQM8MMM= 12 | -----END CERTIFICATE----- 13 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/services.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(AlgorithmManagerFactory::class) 25 | ->public() 26 | ; 27 | }; 28 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/jku_commands.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(Console\JKULoaderCommand::class); 25 | $container->set(Console\X5ULoaderCommand::class); 26 | }; 27 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/ECDHES/ECDHESA128KW.php: -------------------------------------------------------------------------------- 1 | jwe = $jwe; 29 | } 30 | 31 | public function getJwe(): JWE 32 | { 33 | return $this->jwe; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Event/JWSBuiltSuccessEvent.php: -------------------------------------------------------------------------------- 1 | jws = $jws; 29 | } 30 | 31 | public function getJws(): JWS 32 | { 33 | return $this->jws; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/Algorithms/signature_none.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(Algorithm\None::class) 25 | ->tag('jose.algorithm', ['alias' => 'none']) 26 | ; 27 | }; 28 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/Algorithms/signature_eddsa.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(Algorithm\EdDSA::class) 25 | ->tag('jose.algorithm', ['alias' => 'EdDSA']) 26 | ; 27 | }; 28 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/views/data_collector/tab/jwe.html.twig: -------------------------------------------------------------------------------- 1 |
2 |

JWE

3 |
4 | {% include '@JoseFramework/data_collector/tab/jwe/builders.html.twig' %} 5 | {% include '@JoseFramework/data_collector/tab/jwe/decrypters.html.twig' %} 6 | {% include '@JoseFramework/data_collector/tab/jwe/loaders.html.twig' %} 7 | {% include '@JoseFramework/data_collector/tab/jwe/key_encryption_algorithms.html.twig' %} 8 | {% include '@JoseFramework/data_collector/tab/jwe/content_encryption_algorithms.html.twig' %} 9 | {% include '@JoseFramework/data_collector/tab/jwe/compression_methods.html.twig' %} 10 | {% include '@JoseFramework/data_collector/tab/jwe/serialization_modes.html.twig' %} 11 |
12 |
13 | -------------------------------------------------------------------------------- /src/Component/KeyManagement/Analyzer/NoneAnalyzer.php: -------------------------------------------------------------------------------- 1 | get('kty')) { 23 | return; 24 | } 25 | 26 | $bag->add(Message::high('This key is a meant to be used with the algorithm "none". This algorithm is not secured and should be used with care.')); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Event/NestedTokenIssuedEvent.php: -------------------------------------------------------------------------------- 1 | nestedToken = $nestedToken; 28 | } 29 | 30 | public function getNestedToken(): string 31 | { 32 | return $this->nestedToken; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/Algorithms/encryption_dir.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(KeyEncryption\Dir::class) 25 | ->tag('jose.algorithm', ['alias' => 'dir']) 26 | ; 27 | }; 28 | -------------------------------------------------------------------------------- /src/Component/Encryption/Algorithm/KeyEncryption/KeyAgreement.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->public() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(JWKSetSource\JWKSet::class); 25 | $container->set(JWKSetSource\JKU::class); 26 | $container->set(JWKSetSource\X5U::class); 27 | }; 28 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/nested_token.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(Services\NestedTokenBuilderFactory::class) 25 | ->public() 26 | ; 27 | 28 | $container->set(Services\NestedTokenLoaderFactory::class) 29 | ->public() 30 | ; 31 | }; 32 | -------------------------------------------------------------------------------- /src/Component/Checker/ClaimChecker.php: -------------------------------------------------------------------------------- 1 | write($data); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Component/Checker/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-checker", 3 | "description": "Checker component of the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-checker/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Checker\\": "" 20 | } 21 | }, 22 | "require": { 23 | "web-token/jwt-core": "^2.1" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/views/data_collector/tab/jwe/compression_methods.html.twig: -------------------------------------------------------------------------------- 1 |

Compression Methods

2 |

3 | The compression methods are used to shrink the size of the tokens.
4 | Their use is optional, but may be needed in case of heavy payloads. 5 |

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {% if not collector.getData().jwe.compression_methods is empty %} 15 | {% for alias, name in collector.getData().jwe.compression_methods %} 16 | 17 | 18 | 19 | 20 | {% endfor %} 21 | {% else %} 22 | 23 | 24 | 25 | {% endif %} 26 | 27 |
NameAlias
{{ name }}{{ alias }}
There is no compression method.
28 | -------------------------------------------------------------------------------- /tests/Component/Core/JsonConverterTest.php: -------------------------------------------------------------------------------- 1 | 'BAR'])); 33 | static::assertEquals(['foo' => 'BAR'], JsonConverter::decode('{"foo":"BAR"}')); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/PBES2/PBES2HS256A128KW.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(CustomChecker::class) 25 | ->tag('jose.checker.header', ['alias' => 'custom_checker']) 26 | ->tag('jose.checker.claim', ['alias' => 'custom_checker']) 27 | ; 28 | }; 29 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/jwk_services.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 20 | ->private() 21 | ->autoconfigure() 22 | ->autowire() 23 | ; 24 | 25 | $container->set(JWKSetControllerFactory::class); 26 | 27 | $container->set(JWKSetLoader::class) 28 | ->tag('routing.loader') 29 | ; 30 | }; 31 | -------------------------------------------------------------------------------- /src/Component/KeyManagement/Analyzer/OctAnalyzer.php: -------------------------------------------------------------------------------- 1 | get('kty')) { 24 | return; 25 | } 26 | $k = Base64UrlSafe::decode($jwk->get('k')); 27 | $kLength = 8 * mb_strlen($k, '8bit'); 28 | if ($kLength < 128) { 29 | $bag->add(Message::high('The key length is less than 128 bits.')); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/compression_methods.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(Compression\CompressionMethodManagerFactory::class) 25 | ->public() 26 | ; 27 | 28 | $container->set(Compression\Deflate::class) 29 | ->tag('jose.compression_method', ['alias' => 'DEF']) 30 | ; 31 | }; 32 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/None/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-signature-algorithm-none", 3 | "description": "None Signature Algorithm the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-framework/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Signature\\Algorithm\\": "" 20 | } 21 | }, 22 | "require": { 23 | "web-token/jwt-signature": "^2.1" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/views/data_collector/tab/jwe/serialization_modes.html.twig: -------------------------------------------------------------------------------- 1 |

Serialization Modes

2 |

3 | The serialization modes are used to convert a JWE object into a JSON object.
4 | The JWE Compact serialization mode is the most common as it allows tokens to be used in a web context. 5 |

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {% if not collector.getData().jwe.jwe_serialization is empty %} 15 | {% for alias, name in collector.getData().jwe.jwe_serialization %} 16 | 17 | 18 | 19 | 20 | {% endfor %} 21 | {% else %} 22 | 23 | 24 | 25 | {% endif %} 26 | 27 |
NameAlias
{{ name }}{{ alias }}
There is no compression method.
28 | -------------------------------------------------------------------------------- /src/Component/Console/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-console", 3 | "description": "Console component of the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-console/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Console\\": "" 20 | } 21 | }, 22 | "require": { 23 | "symfony/console": "^4.2|^5.0", 24 | "web-token/jwt-key-mgmt": "^2.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/Experimental/ContentEncryption/A128CCM_64_64.php: -------------------------------------------------------------------------------- 1 | jwkset = $jwkset; 28 | } 29 | 30 | public function __invoke(): Response 31 | { 32 | return new Response( 33 | $this->jwkset, 34 | Response::HTTP_OK, 35 | [ 36 | 'Content-Type' => 'application/jwk-set+json; charset=UTF-8', 37 | ] 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tests/Bundle/JoseFramework/TestBundle/Service/MockClientCallback.php: -------------------------------------------------------------------------------- 1 | response = $response; 30 | } 31 | 32 | public function sendRequest(RequestInterface $request): ResponseInterface 33 | { 34 | return $this->response; 35 | } 36 | } -------------------------------------------------------------------------------- /tests/Component/KeyManagement/EC/PEM/570-ec-sect571r1-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICXjCCAccCAg4GMA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG 3 | A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE 4 | MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl 5 | YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw 6 | OTI3MTMwMDE0WhcNMTcwOTI2MTMwMDE0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE 7 | CAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs 8 | ZS5jb20wgacwEAYHKoZIzj0CAQYFK4EEACcDgZIABAIZ0Rc0Y3jsqPqqptRz3tiS 9 | AuvTHA9vUigM2gUjM6YkTKofP7RRls4dqt6aM7/1eLbFg4Jdh9DXS4zU1EFeiZQZ 10 | +drSQYAmAgAtTzpmtmUoy+miwtiSBomu3CSUe6YrVvWb+Oirmvw2x3BCTJW2Xjhy 11 | 5y6tDPVRRyhg0nh5wm/UxZv4jo7AZuJV8ztZKwCEADANBgkqhkiG9w0BAQUFAAOB 12 | gQBlaOF5O4RyvDQ1qCAuM6oXjmL3kCA3Kp7VfytDYaxbaJVhC8PnE0A8VPX2ypn9 13 | aQR4yq98e2umPsrSL7gPddoga+OvatusG9GnIviWGSzazQBQTTQdESJxrPdDXE0E 14 | YF5PPxAO+0yKGqkl8PepvymXBrMAeszlHaRFXeRojXVALw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /src/Component/NestedToken/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-nested-token", 3 | "description": "Nested Token component of the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-nested-token/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\NestedToken\\": "" 20 | } 21 | }, 22 | "require": { 23 | "web-token/jwt-encryption": "^2.1", 24 | "web-token/jwt-signature": "^2.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Component/Signature/Serializer/JWSSerializer.php: -------------------------------------------------------------------------------- 1 | iss('iss'); 34 | $bag->alg('alg'); 35 | $bag->aud(['aud']); 36 | 37 | static::assertEquals(['aud'], $bag->aud()); 38 | static::assertEquals('iss', $bag->get('iss')); 39 | static::assertEquals('alg', $bag->get('alg')); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /.github/workflows/coding-standards.yml: -------------------------------------------------------------------------------- 1 | name: Coding Standards 2 | 3 | on: [push] 4 | 5 | jobs: 6 | tests: 7 | runs-on: ${{ matrix.operating-system }} 8 | strategy: 9 | matrix: 10 | operating-system: [ubuntu-latest] 11 | php-versions: ['7.4'] 12 | name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} 13 | 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v2 17 | with: 18 | ref: ${{ github.head_ref }} 19 | 20 | - name: Setup PHP, with composer and extensions 21 | uses: shivammathur/setup-php@v2 22 | with: 23 | php-version: ${{ matrix.php-versions }} 24 | extensions: json, mbstring, openssl, gmp 25 | coverage: xdebug 26 | 27 | - name: Install Composer dependencies 28 | run: | 29 | composer update --no-progress --no-suggest --prefer-dist --optimize-autoloader 30 | 31 | - name: PHP-CS-FIXER 32 | run: composer test:syntax 33 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/jws_serializers.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(Serializer\JWSSerializerManagerFactory::class) 25 | ->public() 26 | ; 27 | 28 | $container->set(Serializer\CompactSerializer::class); 29 | $container->set(Serializer\JSONFlattenedSerializer::class); 30 | $container->set(Serializer\JSONGeneralSerializer::class); 31 | }; 32 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/views/data_collector/tab/jws/serialization_modes.html.twig: -------------------------------------------------------------------------------- 1 |

Serialization Modes

2 |

3 | The serialization modes are used to convert a JWS object into a JSON object.
4 | The JWS Compact serialization mode is the most common as it allows tokens to be used in a web context. 5 |

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {% if not collector.getData().jws.jws_serialization is empty %} 15 | {% for alias, name in collector.getData().jws.jws_serialization %} 16 | 17 | 18 | 19 | 20 | {% endfor %} 21 | {% else %} 22 | 23 | 24 | 25 | {% endif %} 26 | 27 |
NameAlias
{{ name }}{{ alias }}
There is no serialization modes. Did you install "web-token/jwt-signature"?
28 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/ECDSA/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-signature-algorithm-ecdsa", 3 | "description": "ECDSA Based Signature Algorithms the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-framework/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Signature\\Algorithm\\": "" 20 | } 21 | }, 22 | "require": { 23 | "ext-openssl": "*", 24 | "web-token/jwt-signature": "^2.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/jwe_serializers.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(Serializer\JWESerializerManagerFactory::class) 25 | ->public() 26 | ; 27 | 28 | $container->set(Serializer\CompactSerializer::class); 29 | $container->set(Serializer\JSONFlattenedSerializer::class); 30 | $container->set(Serializer\JSONGeneralSerializer::class); 31 | }; 32 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/PBES2/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-encryption-algorithm-pbes2", 3 | "description": "PBES2* Based Key Encryption Algorithms the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-framework/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Encryption\\Algorithm\\KeyEncryption\\": "" 20 | } 21 | }, 22 | "require": { 23 | "web-token/jwt-encryption": "^2.1" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/Component/KeyManagement/Keys/RSA/private.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAN91kQxBuaze3WjI 3 | CNjeR/HD8E3kDzp89+Lhtn3tMish4yQxhNl6BEkabuS3pUj3WDP6+AFjBVqA1j3f 4 | u8Wqu7hRJDPHOs2kCII+LhIqvqQTLx/nvNOUhW2DimKn0HuHnlwJODq0MHFJEq5R 5 | rJH+mFGsP9yMGz4MxA04E2RVbUJRAgMBAAECgYEAjrDrO3Fo2GvD5Jn/lER0mnxt 6 | Ib/kvYt5WyaYutbRN1u/SKhaVeklfWzkrSZb5DkV2LOE1JXfoEgvBnms1O9OSJXw 7 | qDrFF7NDebw95g6JzI+SbkIHw0Cb+/E9K92FjvW3Bi8j9PKIa8c/dpwIAIirc/q8 8 | uhSTf4WoIOHSFbSaQPECQQD1Wi9vynJLI5lShOs0wPomZOwNrXa73Lj8ciZC4oPS 9 | t6tWjbLnLsP+vTSLUyEYeQGsjdbY+y5siJmAqnV/ShB9AkEA6Sgna9gQw4dXN0jB 10 | SjOZSjl4S2/H3wHatclrvlYfbJVU6GlIlqWGaUkdFvCuEr9iXJAY4zpEQ4P370EZ 11 | tsyVZQJBAOZu/X6RNSc9GBNYo0+4rzjAMLPn50wp0dPHogfPlt+hgVqZWx2l3o6y 12 | RVdVjA/gFqJp1Q+VWdS1tvYRIqmadkECQCVdqQuwgedEHmcewtNod42crjmwvWBx 13 | BKMTl6/WT4zwVb41eUujVWo0LHRLuCoK//GDqmloIh6L3MU8MqnIGb0CQFWcpD4/ 14 | roCkMblk0hPoQPpyapJexc438x7XuEGFEhyxxauqC5R4YFKCf+KBS2gZgr4GSwBU 15 | Qww+qZ3eRYM7faM= 16 | -----END PRIVATE KEY----- 17 | -------------------------------------------------------------------------------- /src/Component/Encryption/Compression/CompressionMethod.php: -------------------------------------------------------------------------------- 1 | claims = $claims; 35 | } 36 | 37 | /** 38 | * @return string[] 39 | */ 40 | public function getClaims(): array 41 | { 42 | return $this->claims; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/Experimental/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-encryption-algorithm-experimental", 3 | "description": "Experimental Key and Content Encryption Algorithms the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-framework/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Encryption\\Algorithm\\": "" 20 | } 21 | }, 22 | "require": { 23 | "ext-openssl": "*", 24 | "web-token/jwt-encryption-algorithm-rsa": "^2.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/ContentEncryption/AESCBC/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-encryption-algorithm-aescbc", 3 | "description": "AES CBC Based Content Encryption Algorithms the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-framework/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Encryption\\Algorithm\\ContentEncryption\\": "" 20 | } 21 | }, 22 | "require": { 23 | "ext-openssl": "*", 24 | "web-token/jwt-encryption": "^2.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/ContentEncryption/AESGCM/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-encryption-algorithm-aesgcm", 3 | "description": "AES GCM Based Content Encryption Algorithms the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-framework/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Encryption\\Algorithm\\ContentEncryption\\": "" 20 | } 21 | }, 22 | "require": { 23 | "ext-openssl": "*", 24 | "web-token/jwt-encryption": "^2.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/Experimental/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-signature-algorithm-experimental", 3 | "description": "Experimental Signature Algorithms the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-framework/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Signature\\Algorithm\\": "" 20 | } 21 | }, 22 | "require": { 23 | "web-token/jwt-signature-algorithm-rsa": "^2.1", 24 | "web-token/jwt-signature-algorithm-hmac": "^2.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/SignatureAlgorithm/HMAC/HS256.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(Algorithm\ES256::class) 25 | ->tag('jose.algorithm', ['alias' => 'ES256']) 26 | ; 27 | 28 | $container->set(Algorithm\ES384::class) 29 | ->tag('jose.algorithm', ['alias' => 'ES384']) 30 | ; 31 | 32 | $container->set(Algorithm\ES512::class) 33 | ->tag('jose.algorithm', ['alias' => 'ES512']) 34 | ; 35 | }; 36 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/Algorithms/signature_hmac.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(Algorithm\HS256::class) 25 | ->tag('jose.algorithm', ['alias' => 'HS256']) 26 | ; 27 | 28 | $container->set(Algorithm\HS384::class) 29 | ->tag('jose.algorithm', ['alias' => 'HS384']) 30 | ; 31 | 32 | $container->set(Algorithm\HS512::class) 33 | ->tag('jose.algorithm', ['alias' => 'HS512']) 34 | ; 35 | }; 36 | -------------------------------------------------------------------------------- /src/Component/Checker/MissingMandatoryHeaderParameterException.php: -------------------------------------------------------------------------------- 1 | parameters = $parameters; 35 | } 36 | 37 | /** 38 | * @return string[] 39 | */ 40 | public function getParameters(): array 41 | { 42 | return $this->parameters; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Component/KeyManagement/Analyzer/HS256KeyAnalyzer.php: -------------------------------------------------------------------------------- 1 | get('kty')) { 24 | return; 25 | } 26 | if (!$jwk->has('alg') || 'HS256' !== $jwk->get('alg')) { 27 | return; 28 | } 29 | $k = Base64UrlSafe::decode($jwk->get('k')); 30 | $kLength = 8 * mb_strlen($k, '8bit'); 31 | if ($kLength < 256) { 32 | $bag->add(Message::high('HS256 algorithm requires at least 256 bits key length.')); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Component/KeyManagement/Analyzer/HS384KeyAnalyzer.php: -------------------------------------------------------------------------------- 1 | get('kty')) { 24 | return; 25 | } 26 | if (!$jwk->has('alg') || 'HS384' !== $jwk->get('alg')) { 27 | return; 28 | } 29 | $k = Base64UrlSafe::decode($jwk->get('k')); 30 | $kLength = 8 * mb_strlen($k, '8bit'); 31 | if ($kLength < 384) { 32 | $bag->add(Message::high('HS384 algorithm requires at least 384 bits key length.')); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Component/KeyManagement/Analyzer/HS512KeyAnalyzer.php: -------------------------------------------------------------------------------- 1 | get('kty')) { 24 | return; 25 | } 26 | if (!$jwk->has('alg') || 'HS512' !== $jwk->get('alg')) { 27 | return; 28 | } 29 | $k = Base64UrlSafe::decode($jwk->get('k')); 30 | $kLength = 8 * mb_strlen($k, '8bit'); 31 | if ($kLength < 512) { 32 | $bag->add(Message::high('HS512 algorithm requires at least 512 bits key length.')); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/jwe_services.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 20 | ->private() 21 | ->autoconfigure() 22 | ->autowire() 23 | ; 24 | 25 | $container->set(Services\JWEBuilderFactory::class) 26 | ->public() 27 | ; 28 | 29 | $container->set(Services\JWEDecrypterFactory::class) 30 | ->public() 31 | ; 32 | 33 | $container->set(Services\JWELoaderFactory::class) 34 | ->public() 35 | ; 36 | 37 | $container->set(Encryption\JWETokenSupport::class); 38 | }; 39 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/jws_services.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 20 | ->private() 21 | ->autoconfigure() 22 | ->autowire() 23 | ; 24 | 25 | $container->set(Services\JWSBuilderFactory::class) 26 | ->public() 27 | ; 28 | 29 | $container->set(Services\JWSVerifierFactory::class) 30 | ->public() 31 | ; 32 | 33 | $container->set(Services\JWSLoaderFactory::class) 34 | ->public() 35 | ; 36 | 37 | $container->set(Signature\JWSTokenSupport::class); 38 | }; 39 | -------------------------------------------------------------------------------- /.github/workflows/functional-tests.yml: -------------------------------------------------------------------------------- 1 | name: Functional Tests 2 | 3 | on: [push] 4 | 5 | jobs: 6 | tests: 7 | runs-on: ${{ matrix.operating-system }} 8 | strategy: 9 | matrix: 10 | operating-system: [ubuntu-latest] 11 | php-versions: ['7.2', '7.3', '7.4', '8.0'] 12 | name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | with: 17 | ref: ${{ github.head_ref }} 18 | 19 | - name: Setup PHP 20 | uses: shivammathur/setup-php@v2 21 | with: 22 | php-version: ${{ matrix.php-versions }} 23 | extensions: json, mbstring, openssl, gmp 24 | coverage: xdebug 25 | 26 | - name: Validate composer.json and composer.lock 27 | run: composer validate 28 | 29 | - name: Install dependencies 30 | run: | 31 | composer update --no-progress --no-suggest --prefer-dist --optimize-autoloader 32 | 33 | - name: Run tests 34 | run: vendor/bin/phpunit -c phpunit.xml.dist --group=functional 35 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Event/JWEDecryptionFailureEvent.php: -------------------------------------------------------------------------------- 1 | JWKSet = $JWKSet; 35 | $this->jwe = $jwe; 36 | } 37 | 38 | public function getJWKSet(): JWKSet 39 | { 40 | return $this->JWKSet; 41 | } 42 | 43 | public function getJwe(): JWE 44 | { 45 | return $this->jwe; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Component/Signature/Algorithm/MacAlgorithm.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(KeyEncryption\A128KW::class) 25 | ->tag('jose.algorithm', ['alias' => 'A128KW']) 26 | ; 27 | 28 | $container->set(KeyEncryption\A192KW::class) 29 | ->tag('jose.algorithm', ['alias' => 'A192KW']) 30 | ; 31 | 32 | $container->set(KeyEncryption\A256KW::class) 33 | ->tag('jose.algorithm', ['alias' => 'A256KW']) 34 | ; 35 | }; 36 | -------------------------------------------------------------------------------- /src/Component/Checker/HeaderChecker.php: -------------------------------------------------------------------------------- 1 | minus($subtrahend)->mod($modulus); 26 | } 27 | 28 | public static function mul(BigInteger $multiplier, BigInteger $muliplicand, BigInteger $modulus): BigInteger 29 | { 30 | return $multiplier->multipliedBy($muliplicand)->mod($modulus); 31 | } 32 | 33 | public static function div(BigInteger $dividend, BigInteger $divisor, BigInteger $modulus): BigInteger 34 | { 35 | return self::mul($dividend, Math::inverseMod($divisor, $modulus), $modulus); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/EncryptionAlgorithm/KeyEncryption/AESGCMKW/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-encryption-algorithm-aesgcmkw", 3 | "description": "AES GCM Key Wrapping Based Key Encryption Algorithms the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-framework/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Encryption\\Algorithm\\KeyEncryption\\": "" 20 | } 21 | }, 22 | "require": { 23 | "ext-openssl": "*", 24 | "spomky-labs/aes-key-wrap": "^5.0|^6.0", 25 | "web-token/jwt-encryption": "^2.1" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/Algorithms/encryption_rsa.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(KeyEncryption\RSA15::class) 25 | ->tag('jose.algorithm', ['alias' => 'RSA1_5']) 26 | ; 27 | 28 | $container->set(KeyEncryption\RSAOAEP::class) 29 | ->tag('jose.algorithm', ['alias' => 'RSA-OAEP']) 30 | ; 31 | 32 | $container->set(KeyEncryption\RSAOAEP256::class) 33 | ->tag('jose.algorithm', ['alias' => 'RSA-OAEP-256']) 34 | ; 35 | }; 36 | -------------------------------------------------------------------------------- /src/Component/Signature/Algorithm/SignatureAlgorithm.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(ContentEncryption\A128GCM::class) 25 | ->tag('jose.algorithm', ['alias' => 'A128GCM']) 26 | ; 27 | 28 | $container->set(ContentEncryption\A192GCM::class) 29 | ->tag('jose.algorithm', ['alias' => 'A192GCM']) 30 | ; 31 | 32 | $container->set(ContentEncryption\A256GCM::class) 33 | ->tag('jose.algorithm', ['alias' => 'A256GCM']) 34 | ; 35 | }; 36 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/Algorithms/encryption_aesgcmkw.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(KeyEncryption\A128GCMKW::class) 25 | ->tag('jose.algorithm', ['alias' => 'A128GCMKW']) 26 | ; 27 | 28 | $container->set(KeyEncryption\A192GCMKW::class) 29 | ->tag('jose.algorithm', ['alias' => 'A192GCMKW']) 30 | ; 31 | 32 | $container->set(KeyEncryption\A256GCMKW::class) 33 | ->tag('jose.algorithm', ['alias' => 'A256GCMKW']) 34 | ; 35 | }; 36 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/DependencyInjection/Compiler/EventDispatcherAliasCompilerPass.php: -------------------------------------------------------------------------------- 1 | hasDefinition('event_dispatcher') || $container->hasAlias(EventDispatcherInterface::class)) { 28 | return; 29 | } 30 | 31 | $container->setAlias(EventDispatcherInterface::class, 'event_dispatcher'); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/Algorithms/encryption_experimental_chacha20_poly1305.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 27 | ->private() 28 | ->autoconfigure() 29 | ->autowire() 30 | ; 31 | 32 | $container->set(KeyEncryption\Chacha20Poly1305::class) 33 | ->tag('jose.algorithm', ['alias' => 'chacha20-poly1305']) 34 | ; 35 | }; 36 | -------------------------------------------------------------------------------- /src/Ecc/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-util-ecc", 3 | "description": "ECC Tools for the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-framework/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Core\\Util\\Ecc\\": "" 20 | } 21 | }, 22 | "require": { 23 | "brick/math": "^0.8.17|^0.9" 24 | }, 25 | "suggest": { 26 | "ext-gmp": "GMP or BCMath is highly recommended to improve the library performance", 27 | "ext-bcmath": "GMP or BCMath is highly recommended to improve the library performance" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/jwk_sources.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->public() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(JWKSource\KeyFile::class); 25 | $container->set(JWKSource\P12::class); 26 | $container->set(JWKSource\CertificateFile::class); 27 | $container->set(JWKSource\Values::class); 28 | $container->set(JWKSource\Secret::class); 29 | $container->set(JWKSource\JWK::class); 30 | $container->set(JWKSource\X5C::class); 31 | $container->set(JWKSource\JWKSet::class); 32 | }; 33 | -------------------------------------------------------------------------------- /src/Component/Signature/JWSVerifierFactory.php: -------------------------------------------------------------------------------- 1 | algorithmManagerFactory = $algorithmManagerFactory; 28 | } 29 | 30 | /** 31 | * Creates a JWSVerifier using the given signature algorithm aliases. 32 | * 33 | * @param string[] $algorithms 34 | */ 35 | public function create(array $algorithms): JWSVerifier 36 | { 37 | $algorithmManager = $this->algorithmManagerFactory->create($algorithms); 38 | 39 | return new JWSVerifier($algorithmManager); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2017 Spomky-Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tests/Component/Console/Sample/2048b-rsa-example-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIC2jCCAkMCAg38MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG 3 | A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE 4 | MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl 5 | YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw 6 | ODIyMDUyNzQxWhcNMTcwODIxMDUyNzQxWjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE 7 | CAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs 8 | ZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC0z9FeMynsC8+u 9 | dvX+LciZxnh5uRj4C9S6tNeeAlIGCfQYk0zUcNFCoCkTknNQd/YEiawDLNbxBqut 10 | bMDZ1aarys1a0lYmUeVLCIqvzBkPJTSQsCopQQ9V8WuT252zzNzs68dVGNdCJd5J 11 | NRQykpwexmnjPPv0mvj7i8XgG379TyW6P+WWV5okeUkXJ9eJS2ouDYdR2SM9BoVW 12 | +FgxDu6BmXhozW5EfsnajFp7HL8kQClI0QOc79yuKl3492rH6bzFsFn2lfwWy9ic 13 | 7cP8EpCTeFp1tFaD+vxBhPZkeTQ1HKx6hQ5zeHIB5ySJJZ7af2W8r4eTGYzbdRW2 14 | 4DDHCPhZAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAQMv+BFvGdMVzkQaQ3/+2noVz 15 | /uAKbzpEL8xTcxYyP3lkOeh4FoxiSWqy5pGFALdPONoDuYFpLhjJSZaEwuvjI/Tr 16 | rGhLV1pRG9frwDFshqD2Vaj4ENBCBh6UpeBop5+285zQ4SI7q4U9oSebUDJiuOx6 17 | +tZ9KynmrbJpTSi0+BM= 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /src/Bundle/JoseFramework/Resources/config/Algorithms/encryption_aescbc.php: -------------------------------------------------------------------------------- 1 | services()->defaults() 19 | ->private() 20 | ->autoconfigure() 21 | ->autowire() 22 | ; 23 | 24 | $container->set(ContentEncryption\A128CBCHS256::class) 25 | ->tag('jose.algorithm', ['alias' => 'A128CBC-HS256']) 26 | ; 27 | 28 | $container->set(ContentEncryption\A192CBCHS384::class) 29 | ->tag('jose.algorithm', ['alias' => 'A192CBC-HS384']) 30 | ; 31 | 32 | $container->set(ContentEncryption\A256CBCHS512::class) 33 | ->tag('jose.algorithm', ['alias' => 'A256CBC-HS512']) 34 | ; 35 | }; 36 | -------------------------------------------------------------------------------- /src/Component/Core/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-token/jwt-core", 3 | "description": "Core component of the JWT Framework.", 4 | "type": "library", 5 | "license": "MIT", 6 | "keywords": ["JWS", "JWT", "JWE", "JWA", "JWK", "JWKSet", "Jot", "Jose", "RFC7515", "RFC7516", "RFC7517", "RFC7518", "RFC7519", "RFC7520", "Bundle", "Symfony"], 7 | "homepage": "https://github.com/web-token", 8 | "authors": [ 9 | { 10 | "name": "Florent Morselli", 11 | "homepage": "https://github.com/Spomky" 12 | },{ 13 | "name": "All contributors", 14 | "homepage": "https://github.com/web-token/jwt-framework/contributors" 15 | } 16 | ], 17 | "autoload": { 18 | "psr-4": { 19 | "Jose\\Component\\Core\\": "" 20 | } 21 | }, 22 | "require": { 23 | "php": ">=7.2", 24 | "ext-json": "*", 25 | "ext-mbstring": "*", 26 | "brick/math": "^0.8.17|^0.9", 27 | "fgrosse/phpasn1": "^2.0", 28 | "paragonie/constant_time_encoding": "^2.4" 29 | }, 30 | "conflict": { 31 | "spomky-labs/jose": "*" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Easy/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2019 Spomky-Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/Ecc/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2019 Spomky-Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------