Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
D documents
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pass
  • documents
  • Wiki
  • Home

Home · Changes

Page history
Update home authored Mar 23, 2019 by 叶佳菲's avatar 叶佳菲
Show whitespace changes
Inline Side-by-side
Showing with 24 additions and 10 deletions
+24 -10
  • home.md home.md +24 -10
  • No files found.
home.md
View page @ 1ef0f0ba
...@@ -17,6 +17,7 @@ http://pre.sovell.com/oauth/v2/userinfo ...@@ -17,6 +17,7 @@ http://pre.sovell.com/oauth/v2/userinfo
``` ```
client_id=B-8onb81TPCog2YBhSsQaA client_id=B-8onb81TPCog2YBhSsQaA
client_secret=q1LQuI8C4CI client_secret=q1LQuI8C4CI
domain=pre.sovell.com
``` ```
- 生产环境Oauth2地址 - 生产环境Oauth2地址
...@@ -24,11 +25,15 @@ client_secret=q1LQuI8C4CI ...@@ -24,11 +25,15 @@ client_secret=q1LQuI8C4CI
http://pass.sovell.com/oauth/v2/authorize http://pass.sovell.com/oauth/v2/authorize
http://pass.sovell.com/oauth/v2/token http://pass.sovell.com/oauth/v2/token
http://pass.sovell.com/oauth/v2/check_token http://pass.sovell.com/oauth/v2/check_token
http://pre.sovell.com/oauth/v2/userinfo http://pass.sovell.com/oauth/v2/userinfo
``` ```
- 生产环境终端信息根据实际情况配置 - 生产环境终端信息根据实际情况配置
```
domain=pass.sovell.com
```
### 终端方式授权 ### 终端方式授权
- 这种方式只对client进行授权,没有用户信息 - 这种方式只对client进行授权,没有用户信息
...@@ -53,11 +58,16 @@ http://pre.sovell.com/oauth/v2/userinfo ...@@ -53,11 +58,16 @@ http://pre.sovell.com/oauth/v2/userinfo
1. 发送给某个手机 1. 发送给某个手机
```javascript ```javascript
GET /oauth/v2/code?phone=18768424633&title=我的短信 HTTP/1.1 GET /oauth/v2/code?phone=${phone}&title=${title} HTTP/1.1
Host: pre.sovell.com Host: ${domain}
Authorization: Bearer it_is_a_token Authorization: Bearer ${token}
``` ```
|参数名|类型|说明|
|:---|:---|:---|
|phone|string|手机号|
|title|string|短信头|
1. 发送成功后不返回实际内容,HttpStatus=200即为成功 1. 发送成功后不返回实际内容,HttpStatus=200即为成功
1. 成功后调用/token接口 1. 成功后调用/token接口
...@@ -66,12 +76,17 @@ http://pre.sovell.com/oauth/v2/userinfo ...@@ -66,12 +76,17 @@ http://pre.sovell.com/oauth/v2/userinfo
```javascript ```javascript
POST /oauth/v2/token HTTP/1.1 POST /oauth/v2/token HTTP/1.1
Host: pre.sovell.com Host: ${domain}
Content-Type: application/x-www-form-urlencoded Content-Type: application/x-www-form-urlencoded
client_id=B-8onb81TPCog2YBhSsQaA&client_secret=q1LQuI8C4CI&grant_type=authorization_code&code=18768424633.3721 client_id=${client_id}&client_secret=${client_secret}&grant_type=authorization_code&code=${phone}.${code}
``` ```
|参数名|类型|说明|
|:---|:---|:---|
|phone|string|手机号|
|code|string|收到的授权码|
> - grant_type必须为authorization_code > - grant_type必须为authorization_code
### 二维码授权 ### 二维码授权
...@@ -156,8 +171,7 @@ http://pre.sovell.com/oauth/v2/userinfo ...@@ -156,8 +171,7 @@ http://pre.sovell.com/oauth/v2/userinfo
``` ```
POST /oauth/v2/token HTTP/1.1 POST /oauth/v2/token HTTP/1.1
Host: dev.sovell.com Host: ${domain}
Content-Length: 96
Content-Type: application/x-www-form-urlencoded Content-Type: application/x-www-form-urlencoded
code=card/001&client_id=fzU1cb7ESpuaVRThuBcYcQ&client_secret=abc&grant_type=offline_cert code=card/001&client_id=fzU1cb7ESpuaVRThuBcYcQ&client_secret=abc&grant_type=offline_cert
...@@ -196,9 +210,9 @@ http://pre.sovell.com/oauth/v2/userinfo ...@@ -196,9 +210,9 @@ http://pre.sovell.com/oauth/v2/userinfo
``` ```
POST /oauth/v2/userinfo HTTP/1.1 POST /oauth/v2/userinfo HTTP/1.1
Host: pre.sovell.com Host: ${domain}
Content-Length: 96 Content-Length: 96
Authorization: Bearer b03344e6-3128-4dbb-b65e-90707c26088a Authorization: Bearer ${token}
``` ```
> 使用授权的到的token > 使用授权的到的token
......
Clone repository
  • Home
  • 接口
    • 交易
    • 消息
    • 用户
    • 通用券
  • 渠道
    • 微信 1基本参数
    • 微信 2商户平台配置
    • 微信 3公众号参数
    • 微信 4公众平台配置
    • 微信(服务商方式)
    • 支付宝 1基本参数
    • 支付宝 2公钥上传
    • 支付宝(服务商方式)