This commit is contained in:
tanghc
2019-05-06 15:10:37 +08:00
parent 0db229053f
commit 2953f7dc77
26 changed files with 201 additions and 122 deletions

View File

@@ -24,8 +24,16 @@ http://openauth.yourdomain.com/oauth2/appToAppAuth?app_id=2019032617262200001&re
| app_id | 开发者应用的AppId | String | 是 | 开发者应用的AppId | 2015101400446982 |
| redirect_uri | 回调页面 | String | 是 | 参数需要UrlEncode | http%3A%2F%2Fexample.com |
- 第二步获取code
授权成功后会跳转至开发者定义的回调页面即redirect_uri参数对应的url在回调页面请求中会带上当次授权的授权码code和开发者的app_id示例如下
http://www.xxx.com/oauth2callback?app_id=2015101400446982&code=ca34ea491e7146cc87d25fca24c4cD11
- 第三步使用code换取app_auth_token
接口名称open.auth.token.app
开发者通过code可以换取app_auth_token、授权用户的userId。

View File

@@ -144,4 +144,7 @@ $(function () {
})
```
1.7.1开始支持接口名版本号放在url后面规则:`http://host:port/{method}/{version}/`(最后的`/`不能少),如:`http://localhost:8081/story.demo.get/1.0/`
等同于:`http://localhost:8081/api?method=story.demo.get&version=1.0`
把接口名版本号放在url后面的好处是调用接口一目了然在浏览器F12调试的时候特别有用可以一眼看到调用了哪些接口否则将会看到全部都是api请求需要点开查看request header才能知道到底调用了哪个接口