north69 / lexik-jose-bridge
Bridge to allow the use of web-token/jwt-framework with the Lexik JWT Authentication Bundle
Fund package maintenance!
Patreon
Installs: 1 403
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 15
Type:symfony-bundle
Requires
- lexik/jwt-authentication-bundle: ^2.0
- psr/event-dispatcher: ^1.0
- thecodingmachine/safe: ^0.1.15|^1.0
- web-token/jwt-bundle: ^2.0.3
- web-token/jwt-checker: ^2.0.3
- web-token/jwt-encryption: ^2.0.3
- web-token/jwt-key-mgmt: ^2.0.3
- web-token/jwt-signature: ^2.0.3
- web-token/jwt-signature-algorithm-rsa: ^2.0.3
Requires (Dev)
- behat/behat: ^3.0
- behat/mink-browserkit-driver: ^1.3
- behat/mink-extension: ^2.3
- behat/symfony2-extension: ^2.1
- caciobanu/behat-deprecation-extension: ^2.1
- phpstan/phpstan: ^0.12
- phpstan/phpstan-beberlei-assert: ^0.12
- phpstan/phpstan-deprecation-rules: ^0.12
- phpstan/phpstan-strict-rules: ^0.12
- sensio/framework-extra-bundle: ^4.0|^5.0
- symfony/dependency-injection: ^4.3|^5.0
- symfony/expression-language: ^4.3|^5.0
- symfony/finder: ^4.3|^5.0
- symfony/form: ^4.3|^5.0
- symfony/templating: ^4.3|^5.0
- symfony/twig-bundle: ^4.3|^5.0
- symfony/var-dumper: ^4.3|^5.0
- thecodingmachine/phpstan-safe-rule: ^1.0
- web-token/jwt-encryption-algorithm-aesgcm: ^2.0.3
- web-token/jwt-encryption-algorithm-aesgcmkw: ^2.0.3
- web-token/jwt-signature-algorithm-hmac: ^2.0.3
This package is auto-updated.
Last update: 2023-11-21 21:44:46 UTC
README
This Symfony Bundle provides a JWT Encoder for the LexikJWTAuthenticationBundle that uses the web-token/jwt-framework as JWT Creator/Loader.
The Release Process
The release process is described here.
Prerequisites
This library needs at least:
Continuous Integration
It has been successfully tested using PHP 7.2
and PHP 7.3
.
We also track bugs and code quality using Scrutinizer-CI and Sensio Insight.
Coding Standards are verified by StyleCI.
Code coverage is not performed, but Behavior driven development
(BDD) is used to test this bundle.
Installation
Symfony Flex
The preferred way to install this bundle is to rely on Symfony Flex:
composer req "spomky-labs/lexik-jose-bridge:^3.0"
Manual Installation
If you do not use Symfony Flex, then use Composer and install the bundle manually.
composer require spomky-labs/lexik-jose-bridge
Then, add this bundle and the web-token/jwt-framework
bundles into your kernel:
<?php use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\HttpKernel\Kernel; class AppKernel extends Kernel { public function registerBundles() { $bundles = [ ... new Jose\Bundle\JoseFramework\JoseFrameworkBundle(), new SpomkyLabs\LexikJoseBundle\SpomkyLabsLexikJoseBundle(), ]; return $bundles; } }
Signature/Encryption Algorithms
This bundle only installs the RSA based signature algorithms (RS256
, RS384
and RS512
).
If you need other signature algorithms (e.g EC based, HMAC) or if you want to use the encryption feature,
you must install the corresponding packages:
- Signature Algorithms
- All:
composer require web-token/signature-pack
- HMAC:
composer require web-token/jwt-signature-algorithm-hmac
- ECDSA:
composer require web-token/jwt-signature-algorithm-ecdsa
- EdDSA:
composer require web-token/jwt-signature-algorithm-eddsa
- None:
composer require web-token/jwt-signature-algorithm-none
(not recommended) - Experimental:
composer require web-token/jwt-signature-algorithm-experimental
(not recommended)
- All:
- Encryption Algorithms
- All:
composer require web-token/encryption-pack
- Key Encryption:
- ECDH-ES:
composer require web-token/jwt-encryption-algorithm-ecdh-es
- AES Key Wrapping:
composer require web-token/jwt-encryption-algorithm-aeskw
- RSA:
composer require web-token/jwt-encryption-algorithm-rsa
- AES GCM Key Wrapping:
composer require web-token/jwt-encryption-algorithm-aesgcmkw
- Direct:
composer require web-token/jwt-encryption-algorithm-dir
(not recommended) - PBES 2:
composer require web-token/jwt-encryption-algorithm-pbes2
(not recommended)
- ECDH-ES:
- Content Encryption:
- AES GCM:
composer require web-token/jwt-encryption-algorithm-aesgcm
- AES CBC:
composer require web-token/jwt-encryption-algorithm-aescbc
- AES GCM:
- Experimental:
composer require web-token/jwt-encryption-algorithm-experimental
(not recommended)
- All:
Configuration
This bundle needs to be configured. Please see this page to know how to configure it.
How to use
There is nothing to do. Just use your application as usual.
Support
I bring solutions to your problems and answer your questions.
If you really love that project and the work I have done or if you want I prioritize your issues, then you can help me out for a couple of 🍻 or more!
Contributing
Requests for new features, bug fixes and all other ideas to make this library useful are welcome. Please follow these best practices.
Licence
This software is release under MIT licence.