fidelize/jwt-auth-multiple-keys
最新稳定版本:4.2.0
Composer 安装命令:
composer require fidelize/jwt-auth-multiple-keys
包简介
Add multiple keychain support to tymon/jwt-auth package
README 文档
README
This is an extension of tymon/jwt-auth, adding support to:
- Replace deprecated
namshi/josewithlcobucci/jwt - JWT with key pairs instead of a secret
- Validate a JWT against multiple public keys
- Use JWT secret as a fallback
Installing
Firstly, you must install tymon/jwt-auth.
Add this package through Composer: composer require "fidelize/jwt-auth-multiple-keys"
Edit your config/jwt.php file adding/editing these lines:
<?php return [ // ... 'providers' => [ // ... 'jwt' => 'Fidelize\JWTAuth\JwtAdapter', 'auth' => 'Fidelize\JWTAuth\AuthAdapter', // ... ], 'keys_directory' => '/path/yo/your/keys/directory/' ]; ?>
# Don't add a passphrase!
ssh-keygen -t rsa -b 4096 -f keys/jwt.app.key
openssl rsa -in keys/jwt.wholesaler.key -pubout -outform PEM -out keys/jwt.app.key.pub
Warning
Keys must follow the pattern name key.*.key and key.*.key.pub
TODO List
- Support different name patterns
- Add command to generate keys
统计信息
- 总下载量: 14.96k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-15