# 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 '{
    ...
  }'
```

---
