achertovsky / lib-oauth2-client
1.0.1
2024-07-20 12:58 UTC
Requires
- php: >=8.1
- psr/http-client: ^1.0
Requires (Dev)
- phpunit/phpunit: ^10.1
README
用于减少具有 oauth2 的项目中的麻烦的库。预计将是一个方便的解决方案。
用法
要检查用法示例,请参考 tests/unit/Oauth2Test.php
,tests/unit/GoogleAuthenticatorTest.php
。这些测试解释了如何在您的应用程序中使用 Oauth2。
开发
安装环境
docker build -t lib-oauth2-client .
docker run --rm -it -u $(id -u):$(id -g) -w /tmp -v ${PWD}:/tmp lib-oauth2-client composer i
测试
docker run --rm -it -u $(id -u):$(id -g) -w /tmp -v ${PWD}:/tmp lib-oauth2-client vendor/bin/phpunit
测量覆盖率
docker run --rm -it -u $(id -u):$(id -g) -w /tmp -v ${PWD}:/tmp lib-oauth2-client php -dpcov.enabled=1 -dpcov.directory=/tmp vendor/bin/phpunit --coverage-text