krak/lava-oauth2
Composer 安装命令:
composer require krak/lava-oauth2
包简介
Lava OAuth2 Integration
README 文档
README
This library provides OAuth2 integration with the Krak\Lava framework. It uses the league/oauth2-server package for all of the heavy lifting and the Doctrine ORM for the backend.
Installation
Install with composer at krak/lava-oauth2
Usage
<?php use Krak\LavaOAuth2; $app->with(new LavaOAuth2\OAuth2Package()); $app['krak.lava_oauth2']['private_key'] = $app->basePath('oauth-private.key'); $app['krak.lava_oauth2']['public_key'] = $app->basePath('oauth-public.key'); $app['krak.lava_oauth2']['grants'] = [ 'client_credentials' => true, 'access_token_ttl' => new \DateInterval('PT2H'), ]; $app->httpStack()->push($app['krak.lava_oauth2']['resource_server_middleware']); $app->httpStack()->push(mount('/oauth', $app['krak.lava_oauth2']));
This configures the lava_oauth2 application and adds the oauth2 server and middleware onto the main application.
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-04