myparcelcom / auth-module
此软件包最新版本(v2.1.1)没有提供许可证信息。
用于验证JWT令牌和检查其中作用域的软件包
v2.1.1
2024-04-18 06:48 UTC
Requires
- php: >=8.2
- lcobucci/jwt: >=5.0
- myclabs/php-enum: >=1.7
- myparcelcom/json-api: ^3.0
Requires (Dev)
- ext-openssl: *
- mockery/mockery: ^1.5
- phpunit/phpunit: ^11.0
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: ^3.7
README
共享库,用于验证JWT授权头和检查其作用域的认证模块
安装
此库使用Docker来运行php和composer。要安装Docker,请按照文档中的步骤进行。
设置
要设置项目,请运行
./mp.sh setup
提供者
添加提供者以设置公钥
$this->app->singleton(JwtAuthenticator::class, function () {
return (new JwtAuthenticator())->setPublicKey(config('auth.public_key'));
});
命令
以下命令可用于开发
./mp.sh composer <args>
- 在容器内运行composer。
./mp.sh php <args>
- 在php容器上运行任何命令。
./mp.sh test <args>
- 运行PHPUnit测试。
许可证
MyParcel.com的所有软件均根据MyParcel.com通用条款和条件授权。