ns / token-bundle
此扩展包提供了与symfony的JWT令牌集成
4.0.3
2024-05-01 19:54 UTC
Requires
- php: ^7.4||^8.0
- ext-json: *
- codercat/jwk-to-pem: ^1.1
- lcobucci/jwt: ^4.0
- symfony/framework-bundle: ^5.0|^6.0
- symfony/http-client: ^5.0|^6.0
- twig/twig: ^2.0|^3.0
Requires (Dev)
- liip/rmt: ^1.7
- phpunit/phpunit: ^9.0
- rector/rector: ^0.12.16
This package is auto-updated.
Last update: 2024-09-19 04:54:17 UTC
README
composer require ns/token-bundle
编辑 AppKernel.php 并添加扩展包
new NS\TokenBundle\NSTokenBundle(),
编辑 app/config/config.yml
ns_token: generator: id: <some random string> key: <another random string> issuer: <string (often the site source)> short_expiration: 3600 long_expiration: 2592000 signer: Lcobucci\JWT\Signer\Rsa\Sha256 #default
您可以通过实现 Lcobucci\JWT\Signer 接口来使用自己的签名者。