lexik/jwt-authentication-bundle
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
lcobucci/clock | 3.2.0 | 2.92 kB | MIT | prod dev | |
lcobucci/jwt | 5.3.0 | - | BSD-3-Clause | prod | |
namshi/jose | 7.2.3 | 43.97 kB | MIT | prod | |
symfony/config | v7.0.7 | - | MIT | prod dev | |
symfony/dependency-injection | v7.0.7 | - | MIT | prod dev | |
symfony/deprecation-contracts | v3.5.0 | - | MIT | prod dev | |
symfony/event-dispatcher | v7.0.7 | - | MIT | prod dev | |
symfony/filesystem | v7.0.7 | - | MIT | prod dev | |
symfony/http-foundation | v7.0.7 | - | MIT | prod dev | |
symfony/http-kernel | v7.0.7 | - | MIT | prod dev | |
symfony/property-access | v7.0.7 | - | MIT | prod dev | |
symfony/security-bundle | v7.0.7 | - | MIT | prod | |
symfony/translation-contracts | v3.5.0 | - | MIT | prod dev | |
symfony/var-dumper | v7.0.7 | - | MIT | prod dev |
The LexikJWTAuthenticationBundle is a powerful tool that provides JWT (JSON Web Token) authentication for your Symfony API. It adds an extra layer of security to your REST API, making it more robust and secure. The bundle is compatible and has been tested with PHP 7.1+ on Symfony 4.x, 5.x, and 6.x. It's a must-have addition for developers seeking to build secure Symfony APIs.
To use the LexikJWTAuthenticationBundle, you need to first meet the prerequisites, install and configure the bundle in your Symfony project.
Here is a simple step-by-step process to set it up:
composer require lexik/jwt-authentication-bundle
.An example of creating an authenticated user with a JWT Token:
$user = new User(); // your User class
$jwt = $this->get('lexik_jwt_authentication.encoder')
->encode(['username' => $user->getUsername()]);
Remember to catch any exceptions that may occur during authentication process.
The LexikJWTAuthenticationBundle documentation is stored in the Resources/doc
directory of the bundle. It covers everything from getting started, configuration, and usage, to further documentation, such as data customization, functional testing, working with CORS requests, JWT encoder service customization, extending authenticator, creating JWT tokens programmatically, and a database-less user provider.
You can directly access the docs by following this path in the bundle's main directory: [Resources/doc](Resources/doc/index.rst)
.
For extra support, the LexikJWTAuthenticationBundle community advise users to ask questions on StackOverflow using the lexikjwtauthbundle
tag, as it is the official support platform for this bundle.