mirror of
https://github.com/SocialSisterYi/bilibili-API-collect.git
synced 2024-12-28 05:20:07 +08:00
添加web端退出登录
This commit is contained in:
parent
cc590a323a
commit
0796c6924e
@ -41,6 +41,7 @@
|
||||
+ SNS登录(QQ&微博)
|
||||
- [登录基本信息](login/login_info.md)√
|
||||
- [个人中心](login/member_center.md)×
|
||||
- [注销登录](login/exit.md)×
|
||||
- [消息中心](message)
|
||||
- [通知类消息](message/msg.md)×
|
||||
- [私信](message/private_msg.md)×
|
||||
|
60
login/exit.md
Normal file
60
login/exit.md
Normal file
@ -0,0 +1,60 @@
|
||||
# 退出账号登录
|
||||
|
||||
## 退出登录(web端)
|
||||
|
||||
> http://passport.bilibili.com/login?act=exit
|
||||
|
||||
*请求方式:GET*
|
||||
|
||||
认证方式:仅可Cookie(SESSDATA)
|
||||
|
||||
验证登录成功后会进行删除以下cookie项:
|
||||
|
||||
`DedeUserID` `DedeUserID__ckMd5` `SESSDATA` `bili_jct`
|
||||
|
||||
并在服务器注销该登录Token(SESSDATA),该Token即失效
|
||||
|
||||
**回复:**
|
||||
|
||||
响应为一个用于跳转html页面
|
||||
|
||||
**示例:**
|
||||
|
||||
```shell
|
||||
curl 'http://passport.bilibili.com/login?act=exit'\
|
||||
-b 'SESSDATA=xxx;DedeUserID__ckMd5=xxx;SESSDATA=xxx;bili_jct=xxx'
|
||||
```
|
||||
|
||||
**响应头部抓包信息:**
|
||||
|
||||
使用set-cookie删除了以上cookie项
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Date: Mon, 27 Jul 2020 13:42:21 GMT
|
||||
Content-Type: text/html;charset=UTF-8
|
||||
Transfer-Encoding: chunked
|
||||
Connection: keep-alive
|
||||
Server: Apache-Coyote/1.1
|
||||
Set-Cookie: SESSDATA=""; Domain=.bilibili.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
||||
Set-Cookie: SESSDATA__ckMd5=""; Domain=.bilibili.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
|
||||
Set-Cookie: SESSDATA=""; Domain=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; HttpOnly
|
||||
Set-Cookie: SESSDATA__ckMd5=""; Domain=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
|
||||
Set-Cookie: DedeUserID=""; Domain=.bilibili.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
|
||||
Set-Cookie: DedeUserID__ckMd5=""; Domain=.bilibili.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
|
||||
Set-Cookie: DedeUserID=""; Domain=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
|
||||
Set-Cookie: DedeUserID__ckMd5=""; Domain=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
|
||||
Set-Cookie: bili_jct=""; Domain=.bilibili.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
|
||||
Set-Cookie: bili_jct__ckMd5=""; Domain=.bilibili.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
|
||||
Set-Cookie: bili_jct=""; Domain=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
|
||||
Set-Cookie: bili_jct__ckMd5=""; Domain=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
|
||||
Set-Cookie: JSESSIONID=F857ED4084F8824BFDB4CD97EEC3D758; Path=/; HttpOnly
|
||||
Content-Language: zh-CN
|
||||
X-TKID: 1595857341658620367002
|
||||
Expires: Mon, 27 Jul 2020 13:42:20 GMT
|
||||
Cache-Control: no-cache
|
||||
X-Cache-Webcdn: BYPASS from jd-sxhz-dx-w-01
|
||||
Content-Encoding: gzip
|
||||
|
||||
```
|
||||
|
@ -42,10 +42,10 @@ TV端流程&逻辑:
|
||||
|
||||
`data`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| -------- | ----- | ------------- | ---------- |
|
||||
| url | str | 二维码内容url | 恒为87字符 |
|
||||
| oauthKey | str | 扫码登录秘钥 | 恒为32字符 |
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| -------- | ---- | ------------- | ---------- |
|
||||
| url | str | 二维码内容url | 恒为87字符 |
|
||||
| oauthKey | str | 扫码登录秘钥 | 恒为32字符 |
|
||||
|
||||
**示例:**
|
||||
|
||||
@ -77,7 +77,7 @@ curl 'http://passport.bilibili.com/qrcode/getLoginUrl'
|
||||
|
||||
验证登录成功后会进行设置以下cookie项:
|
||||
|
||||
`sid` `DedeUserID` `DedeUserID__ckMd5` `SESSDATA` `bili_jct`
|
||||
`DedeUserID` `DedeUserID__ckMd5` `SESSDATA` `bili_jct`
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
@ -92,11 +92,11 @@ curl 'http://passport.bilibili.com/qrcode/getLoginUrl'
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------- | ---------------------------- | ----------------------------------------- | ------------------------------------------------------------ |
|
||||
| status | bool | 扫码是否成功 | true:成功<br />false:未成功 |
|
||||
| code | num | 返回值 | 0:成功 |
|
||||
| message | str | 错误信息 | 正确无 |
|
||||
| ts | num | 扫码时间 | 错误无 |
|
||||
| data | 正确时:obj<br />错误时:num | 正确时:游戏分站url<br />错误时:错误代码 | 错误时:<br />-1:秘钥错误<br />-2:秘钥超时<br />-4:未扫描<br />-5:未确认 |
|
||||
| status | bool | 扫码是否成功 | true:成功<br />false:未成功 |
|
||||
| data | 正确时:obj<br />错误时:num | 正确时:游戏分站url<br />错误时:错误代码 | 未成功时:<br />-1:秘钥错误<br />-2:秘钥超时<br />-4:未扫描<br />-5:未确认 |
|
||||
|
||||
data 对象:
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
|
@ -124,16 +124,16 @@ YgpjxAQ22pKa9socHIKPCZX0a/NS6Ng9Zzy+rp16b0LJGT6RHw2ERs3+ijCpG96PKTY1Baavwf0xgotm
|
||||
|
||||
**正文参数( application/x-www-form-urlencoded ):**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ----------- | ---- | ------------------ | ------ | ---------------- |
|
||||
| captchaType | num | 6 | 必要 | 必须为`6` |
|
||||
| username | str | 用户登录账号 | 必要 | 手机号或邮箱地址 |
|
||||
| password | str | 加密后的带盐密码 | 必要 | base64格式 |
|
||||
| keep | bool | true | 必要 | 必须为`true` |
|
||||
| key | str | 登录秘钥 | 必要 | 从B站API获取 |
|
||||
| challenge | str | 极验challenge | 必要 | 从B站API获取 |
|
||||
| validate | str | 极验结果 | 必要 | 从极验获取 |
|
||||
| seccode | str | 极验结果+`|jordan` | 必要 | 从极验获取 |
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| ----------- | ---- | ---------------- | ------ | ---------------- |
|
||||
| captchaType | num | 6 | 必要 | 必须为`6` |
|
||||
| username | str | 用户登录账号 | 必要 | 手机号或邮箱地址 |
|
||||
| password | str | 加密后的带盐密码 | 必要 | base64格式 |
|
||||
| keep | bool | true | 必要 | 必须为`true` |
|
||||
| key | str | 登录秘钥 | 必要 | 从B站API获取 |
|
||||
| challenge | str | 极验challenge | 必要 | 从B站API获取 |
|
||||
| validate | str | 极验结果 | 必要 | 从极验获取 |
|
||||
| seccode | str | 极验结果 | 必要 | 从极验获取 |
|
||||
|
||||
**json回复:**
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user