添加app方式api鉴权

This commit is contained in:
SocialSisterYi
2020-07-11 22:17:40 +08:00
parent 8c806b6ed2
commit 3c91c4b699
5 changed files with 50 additions and 21 deletions

View File

@@ -2,24 +2,24 @@
流程&逻辑:
1. 获取`二维码内容url`以及`钥`,以`二维码内容url`生成二维码,等待手机客户端扫描
2.`钥`作为参数进行POST
1. 获取`二维码内容url`以及`钥`,以`二维码内容url`生成二维码,等待手机客户端扫描
2.`钥`作为参数进行POST
3. if "code"==true goto 6 else goto 4是否已经确认
4. if "data"==-4 goto 2 else goto 5是否已经扫描
5. if "data"==-5 goto 3 && 提示`已扫描`else goto 1&提示`二维码超时或错误`钥是否有效)
5. if "data"==-5 goto 3 && 提示`已扫描`else goto 1&提示`二维码超时或错误`钥是否有效)
6. 成功后会自动配置cookie 如需登录游戏分站则访问`data`.`url`中的url
<img src="/imgs/2233login.png"/>
## 申请二维码URL及扫码
## 申请二维码URL及扫码
> http://passport.bilibili.com/qrcode/getLoginUrl
*方式GET*
钥超时为180秒
钥超时为180秒
**json回复**
@@ -64,7 +64,7 @@ http://passport.bilibili.com/qrcode/getLoginUrl
*方式POST*
钥超时为180秒
钥超时为180秒
验证正确时会进行设置以下cookie项
@@ -98,7 +98,7 @@ data 对象:
curl -d "oauthKey=xxx" "http://passport.bilibili.com/qrcode/getLoginInfo"
钥正确时但未扫描时`status``false``data`为num值`-4`
钥正确时但未扫描时`status``false``data`为num值`-4`
```json
{