Go to file
2019-01-25 17:33:55 +08:00
config config change 2019-01-24 13:40:23 +08:00
src rm file 2019-01-25 17:33:55 +08:00
tests 新版本 2019-01-22 18:59:03 +08:00
.gitignore init 2018-01-02 11:15:51 +08:00
composer.json config change 2019-01-23 16:12:45 +08:00
composer.lock 新版本 2019-01-22 18:59:03 +08:00
README.md composer rename 2019-01-22 19:05:49 +08:00

Auth 系统 PHP Client

该项目使用 composer 来完成加载

执行

composer config repositories.php-auth-client vcs git@git.int.haowumc.com:composer/php-auth-client.git
composer require paidian/php-auth-client

代码中启用

  • 注册中间件
$app->routeMiddleware([
    'auth' => PdAuth\Middleware\Authenticate::class,
]);
  • 注册服务
$app->register(PdAuth\PdAuthServiceProvider::class);

配置

在项目 .env 文件中增加如下配置

PDAUTH_APP_ID=appid
PDAUTH_SECRET=123456
PDAUTH_HOST=http://auth.dev.haowumc.com