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

README

用户中心接口封装

使用须知

  • 需依赖Laravel框架运行
  • 暂仅支持 Laravel 5.4
  • SDK本身不维护AccessToken的缓存

安装

  1. 添加下述配置至{project}/package.json
    "repositories": [
+       {
+           "type": "vcs",
+           "url": "https://github.com/ddingchen/thinker"
+       }
    ],
    "require": {
+       "ddingchen/thinker": "dev-master"
    },

项目目录下执行下述命令进行安装

$ composer update ddingchen/thinker
  1. 添加下述代码至{project}/config/app.php
     'providers' => [
+        Thinker\Providers\UCenterServiceProvider::class,
     ]
  1. 项目目录下执行下述命令部署配置文件 {project}/config/ucenter.php
$ artisan vendor:publish --provider="Thinker\Providers\UCenterServiceProvider"
  1. (可选)在.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