yarec / ucenter-sdk
There is no license information available for the latest version (dev-master) of this package.
SDK for Thinker open platform.
dev-master
2018-05-28 02:53 UTC
Requires
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ~3.4
- phpunit/phpunit: ^5
This package is auto-updated.
Last update: 2024-11-29 05:44:40 UTC
README
用户中心接口封装
使用须知
- 需依赖Laravel框架运行
- 暂仅支持 Laravel 5.4
- SDK本身不维护AccessToken的缓存
安装
- 添加下述配置至
{project}/package.json
"repositories": [ + { + "type": "vcs", + "url": "https://github.com/ddingchen/thinker" + } ], "require": { + "ddingchen/thinker": "dev-master" },
项目目录下执行下述命令进行安装
$ composer update ddingchen/thinker
- 添加下述代码至
{project}/config/app.php
'providers' => [
+ Thinker\Providers\UCenterServiceProvider::class,
]
- 项目目录下执行下述命令部署配置文件
{project}/config/ucenter.php
$ artisan vendor:publish --provider="Thinker\Providers\UCenterServiceProvider"
- (可选)在.env文件中覆盖默认配置
#UCENTER_ROOT=http://my.ucenter.domain
UCENTER_CLIENT_ID=YOUR_CLIENT_ID
UCENTER_CLIENT_SECRET=YOUR_CLIENT_SECRET
UCENTER_REDIRECT_URI=http://laravel-54.test/ucenter/login