Files
pyGoEdge-UserPanel/reference/goedge 文档/LoginSessionService.md
2025-11-18 03:36:49 +08:00

146 lines
2.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# LoginSessionService
> 登录SESSION服务
---
## clearOldLoginSessions
> 清理老的SESSION
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/LoginSessionService/clearOldLoginSessions`
- RPC`rpc clearOldLoginSessions(ClearOldLoginSessionsRequest) returns (RPCSuccess);`
**请求对象 (`ClearOldLoginSessionsRequest`)**
```json
{
"sid": "string // 当前SESSION ID",
"ip": "string // 当前操作IP"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/LoginSessionService/clearOldLoginSessions" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## deleteLoginSession
> 删除SESSION
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/LoginSessionService/deleteLoginSession`
- RPC`rpc deleteLoginSession(DeleteLoginSessionRequest) returns (RPCSuccess);`
**请求对象 (`DeleteLoginSessionRequest`)**
```json
{
"sid": "string // SESSION ID"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/LoginSessionService/deleteLoginSession" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## findLoginSession
> 查找SESSION
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/LoginSessionService/findLoginSession`
- RPC`rpc findLoginSession(FindLoginSessionRequest) returns (FindLoginSessionResponse);`
**请求对象 (`FindLoginSessionRequest`)**
```json
{
"sid": "string // SESSION ID"
}
```
**响应对象 (`FindLoginSessionResponse`)**
```json
{
"loginSession": "LoginSession // SESSION信息"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/LoginSessionService/findLoginSession" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## writeLoginSessionValue
> 写入SESSION数据
- 角色:`admin`
- HTTP`POST https://backend.dooki.cloud/LoginSessionService/writeLoginSessionValue`
- RPC`rpc writeLoginSessionValue(WriteLoginSessionValueRequest) returns (RPCSuccess);`
**请求对象 (`WriteLoginSessionValueRequest`)**
```json
{
"sid": "string // SESSION ID",
"key": "string // 数据Key",
"value": "string // 数据值"
}
```
**响应对象 (`RPCSuccess`)**
```json
{}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/LoginSessionService/writeLoginSessionValue" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---