achertovsky/lib-jwt

该包最新版本(4.0.0)没有可用的许可证信息。

JWT POPO库

4.0.0 2024-07-13 13:25 UTC

This package is auto-updated.

Last update: 2024-09-13 13:47:08 UTC


README

一个库,用于减少使用jwt的项目中的麻烦。期望成为一个方便的解决方案。

使用方法

要检查使用案例,请参考 tests/Service/JwtManagerTest.phptests/Service/Functional.php。这些测试解释了如何在您的应用程序中使用JwtManager。

开发

安装环境

docker build -t lib-jwt .
docker run --rm -it -u $(id -u):$(id -g) -w /tmp -v ${PWD}:/tmp lib-jwt composer i

测试

docker run --rm -it -u $(id -u):$(id -g) -w /tmp -v ${PWD}:/tmp lib-jwt vendor/bin/phpunit

使用覆盖率测试

docker run --rm -it -u $(id -u):$(id -g) -w /tmp -v ${PWD}:/tmp lib-jwt php -d pcov.enabled=1 -d pcov.directory=/tmp vendor/bin/phpunit --coverage-text

使用xdebug测试(默认xdebug运行在9001端口)

docker run --rm -it --add-host=host.docker.internal:host-gateway -u $(id -u):$(id -g) -w /tmp -v ${PWD}:/tmp lib-jwt vendor/bin/phpunit