Download the PHP package galcvua/jwt-refresh-bundle without Composer
On this page you can find all versions of the php package galcvua/jwt-refresh-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download galcvua/jwt-refresh-bundle
More information about galcvua/jwt-refresh-bundle
Files in galcvua/jwt-refresh-bundle
Package jwt-refresh-bundle
Short Description Refresh JWT & logout support for Symfony security
License MIT
Informations about the package jwt-refresh-bundle
JWT Refresh Bundle
This bundle manages refresh tokens for JWT (JSON Web Tokens) in the simplest and safest way. It integrates with the LexikJWTAuthenticationBundle, using HTTP-only cookies backed by Symfony’s session system. No Doctrine ORM/ODM or external persistence is required, and your API remains stateless for regular requests.
It is compatible with (and tested on) PHP 8.3+ and Symfony 7.3–8.0.
Features
- Refresh JWTs without persisting refresh tokens.
- Logout endpoint that clears the refresh context.
- Optional OpenAPI decoration for API Platform (refresh + logout operations).
Requirements
- PHP 8.3+
- Symfony 7.3+
- lexik/jwt-authentication-bundle ^3.1
Installation
Register the bundle in config/bundles.php (Symfony Flex does this automatically):
Configuration
Session Cookie Path
By default, Symfony issues the session cookie for the root path /.
If you want the refresh context to be isolated from the rest of your application,
you can restrict the cookie path to the refresh firewall only.
This can be done by overriding the cookie options in framework.session:
Usage
- Authenticate via /api/login_check to obtain an access token (from Lexik).
- Send a POST request to /api/token/refresh to receive a new token.
- Call /api/token/logout to clear the refresh session.
Testing
The bundle includes unit and functional tests. When testing your own application, avoid using mock session storage, because it does not mimic real browser behavior and may cause inconsistent results with stateless firewalls.
All versions of jwt-refresh-bundle with dependencies
symfony/framework-bundle Version ^7.3 || ^8.0
symfony/security-bundle Version ^7.3 || ^8.0
symfony/http-kernel Version ^7.3 || ^8.0
symfony/dependency-injection Version ^7.3 || ^8.0
symfony/routing Version ^7.3 || ^8.0
lexik/jwt-authentication-bundle Version ^3.1