Go to file
2018-05-02 10:55:13 +08:00
src change guard 2018-05-02 10:55:13 +08:00
.gitignore init 2018-01-02 11:15:51 +08:00
composer.json package name 2018-03-15 23:04:12 +08:00
composer.lock init 2018-01-02 11:15:51 +08:00
README.md Update README.md 2018-03-19 15:15:34 +08:00

Auth 系统 PHP Client

该项目使用 composer 来完成加载

执行

composer config repositories.php-auth-client vcs git@git.int.haowumc.com:arch/php-auth-client.git
composer require arch/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