toyokumo / jwt-bundle
Symfony support for generating and interpreting JWT token.
v1.6.0
2026-08-06 02:00 UTC
Requires
- php: ^8.2
- symfony/clock: ^7.0|^8.0
- symfony/config: ^7.0|^8.0
- symfony/dependency-injection: ^7.0|^8.0
- web-token/jwt-framework: ^4.0
Requires (Dev)
- phpunit/phpunit: ^10.0
- roave/security-advisories: dev-master
This package is not auto-updated.
Last update: 2026-08-20 02:23:35 UTC
README
Generating and Interpreting JWT token.
Usage
JWTService
- Set JWK information via .yml file.
# key_info.yml
parameters:
jwt_keys:
# for HS256
key_name_for_HS256_key:
kid: current_kid
alg: HS256
secret: 'secret string with more than 32 chars.'
# for RS256 or ES256
key_name_for_RS256_or_ES256_key:
kid: current_kid
alg: RS256 or ES256
filename: 'public or private key filename'
passphrase: 'passphrase to decode key'
-
Place .yml and key files in the same directory.
-
Set arguments
# jwt.yml
services:
Toyokumo\JWTBundle\JWTService:
arguments:
$keyDirPath: 'path/to/key_info.yml and key files'
$jwkInfos: '%jwt_keys%' # JWK information defined in key_info.yml