# 认证中心 API 接入文档

## 目录

- [1. 概述](#1-概述)
- [2. 接入流程](#2-接入流程)
- [3. OAuth2.0 授权](#3-oauth20-授权)
- [4. 用户认证 API](#4-用户认证-api)
- [5. 余额管理 API](#5-余额管理-api)
- [6. 操作日志 API](#6-操作日志-api)
- [7. 统一响应格式](#7-统一响应格式)
- [8. 错误码说明](#8-错误码说明)
- [9. 附录：PHP 接入示例](#9-附录php-接入示例)

---

## 1. 概述

本文档描述了认证中心（Auth Center）的对外API接口，提供统一的用户认证、余额管理等服务。第三方业务系统可通过 OAuth2.0 协议接入，实现用户单点登录和余额统一管理。

### 1.1 技术特点

- 基于 OAuth2.0 授权码模式
- RESTful API 设计
- JSON 数据格式
- Token 鉴权机制
- 余额变动幂等性保证

### 1.2 基础地址

```
http://your-domain/
```

请将 `your-domain` 替换为实际部署的域名。

---

## 2. 接入流程

### 2.1 接入步骤

1. **注册应用**：在认证中心管理后台创建 OAuth 应用，获取 `client_id` 和 `client_secret`
2. **配置回调地址**：设置用户授权后的回调地址 `redirect_uri`
3. **用户授权**：引导用户跳转到认证中心进行登录授权
4. **获取令牌**：使用授权码换取 `access_token` 和 `refresh_token`
5. **调用 API**：使用 `access_token` 调用各业务接口

### 2.2 应用类型

系统支持两种应用类型：

| 类型 | is_private | 说明 |
|------|------------|------|
| **公开应用** | 0 | 所有认证中心用户都可以登录授权，适用于统一认证场景 |
| **私有应用** | 1 | 只有该应用创建的用户才能登录授权，每个应用独立用户池 |

**公开应用**：
- 用户池共享，任何认证中心的用户都可以授权登录
- 用户通过公开应用注册后，可在其他公开应用中直接登录
- 适用于需要统一身份的公开服务

**私有应用**：
- 用户池隔离，每个私有应用拥有独立的用户
- 用户只能通过该私有应用注册，注册后自动归属该应用
- 私有应用的用户无法在其他应用中登录授权
- 适用于需要独立用户管理的企业/业务场景

**私有应用用户归属规则**：
- 用户通过私有应用注册时，`created_by_client` 字段自动设置为该应用的 `client_id`
- 私有应用登录时，会校验用户是否属于该应用，不属于则拒绝登录
- 公开应用注册的用户 `created_by_client` 为空，可被所有公开应用使用

### 2.3 授权码模式流程图

```
第三方网站                          认证中心
    |                                  |
    |  1. 用户点击"统一登录"            |
    |--------------------------------->|
    |                                  |
    |  2. 显示登录/授权页面             |
    |                                  |
    |  3. 用户登录并确认授权            |
    |                                  |
    |  4. 跳转回 redirect_uri?code=xxx |
    |<---------------------------------|
    |                                  |
    |  5. 后端用 code 换取 token       |
    |--------------------------------->|
    |                                  |
    |  6. 返回 access_token 等         |
    |<---------------------------------|
    |                                  |
    |  7. 使用 token 调用 API          |
    |--------------------------------->|
    |                                  |
    |  8. 返回业务数据                 |
    |<---------------------------------|
```

---

## 3. OAuth2.0 授权

### 3.0 回调地址配置

回调地址（`redirect_uri`）由调用方在发起授权请求时自行传入，系统不再要求在应用配置中预先配置。

**要求**：
- 必须以 `http://` 或 `https://` 开头
- 必须是合法的URL格式

**注意**：为了安全，建议在应用配置中记录允许的回调域名（可选）。

---

### 3.1 授权页面（浏览器跳转）

用户在浏览器中访问此地址，进行登录和授权确认。支持用户名/邮箱登录、手机号+验证码注册登录。

**请求地址**：

```
GET /oauth/authorize
```

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| client_id | string | 是 | 应用ID |
| redirect_uri | string | 是 | 授权后的回调地址，需与应用配置匹配（见3.0节） |
| response_type | string | 是 | 固定值：`code` |
| scope | string | 否 | 授权范围，多个用逗号分隔，默认：`basic` |
| state | string | 否 | 自定义状态值，用于防止CSRF攻击，回调时原样返回 |

**scope 可选值**：

| 范围 | 说明 |
|------|------|
| basic | 获取基本信息（用户名、昵称、头像） |
| balance | 查询账户余额 |
| recharge | 余额操作（充值、消费） |

**示例**：

```
http://auth-center/oauth/authorize?client_id=demo_app&redirect_uri=http://your-site/callback.php&response_type=code&scope=basic,balance&state=abc123
```

**授权成功回调**：

用户同意授权后，浏览器跳转到：

```
http://your-site/callback.php?code=授权码&state=abc123
```

**授权失败回调**：

用户拒绝授权或发生错误时：

```
http://your-site/callback.php?error=access_denied&state=abc123
```

---

### 3.2 获取访问令牌

使用授权码换取访问令牌。

**请求地址**：

```
POST /oauth/token
```

**请求方式**：`application/json`

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| grant_type | string | 是 | 固定值：`authorization_code` |
| code | string | 是 | 授权码，有效期10分钟 |
| client_id | string | 是 | 应用ID |
| client_secret | string | 是 | 应用密钥 |
| redirect_uri | string | 是 | 回调地址，必须与授权时一致 |
| include_user | int | 否 | 是否返回用户信息，1=返回，0=不返回（默认） |

**也可使用 HTTP Basic Auth 传递客户端凭证**：

```
Authorization: Basic base64(client_id:client_secret)
```

**响应示例**（不返回用户信息）：

```json
{
    "code": 200,
    "message": "成功",
    "data": {
        "access_token": "abcdef123456...",
        "token_type": "Bearer",
        "expires_in": 7200,
        "refresh_token": "ghijkl789012...",
        "scope": "basic,balance"
    },
    "timestamp": 1719000000
}
```

**响应示例**（返回用户信息，include_user=1）：

```json
{
    "code": 200,
    "message": "成功",
    "data": {
        "access_token": "abcdef123456...",
        "token_type": "Bearer",
        "expires_in": 7200,
        "refresh_token": "ghijkl789012...",
        "scope": "basic,balance",
        "user": {
            "id": 1,
            "username": "testuser",
            "email": "test@example.com",
            "phone": null,
            "nickname": "测试用户",
            "avatar": null,
            "balance": "100.00",
            "status": 1,
            "created_by_client": null,
            "email_verified": 0,
            "phone_verified": 0,
            "last_login_at": "2024-06-30 12:00:00"
        }
    },
    "timestamp": 1719000000
}
```

**响应字段说明**：

| 字段 | 类型 | 说明 |
|------|------|------|
| access_token | string | 访问令牌，有效期2小时 |
| token_type | string | 令牌类型，固定为 Bearer |
| expires_in | int | 过期时间（秒） |
| refresh_token | string | 刷新令牌，有效期30天 |
| scope | string | 实际授权的范围 |

---

### 3.3 刷新令牌

使用 `refresh_token` 刷新访问令牌。

**请求地址**：

```
POST /oauth/token
```

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| grant_type | string | 是 | 固定值：`refresh_token` |
| refresh_token | string | 是 | 刷新令牌 |
| client_id | string | 是 | 应用ID |
| client_secret | string | 是 | 应用密钥 |

**响应示例**：同获取访问令牌。

---

### 3.4 密码模式（仅限受信任应用）

直接使用用户名密码获取令牌，不推荐第三方使用。

**请求地址**：

```
POST /oauth/token
```

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| grant_type | string | 是 | 固定值：`password` |
| username | string | 是 | 用户名或邮箱 |
| password | string | 是 | 密码 |
| client_id | string | 是 | 应用ID |
| client_secret | string | 是 | 应用密钥 |

**响应示例**：

```json
{
    "code": 200,
    "message": "成功",
    "data": {
        "access_token": "abcdef123456...",
        "token_type": "Bearer",
        "expires_in": 7200,
        "refresh_token": "ghijkl789012...",
        "user": {
            "id": 1,
            "username": "testuser",
            "nickname": "测试用户"
        }
    },
    "timestamp": 1719000000
}
```

---

### 3.5 客户端凭证模式

应用自身获取令牌（不关联用户）。

**请求地址**：

```
POST /oauth/token
```

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| grant_type | string | 是 | 固定值：`client_credentials` |
| client_id | string | 是 | 应用ID |
| client_secret | string | 是 | 应用密钥 |

---

### 3.6 撤销令牌

撤销访问令牌。

**请求地址**：

```
POST /oauth/revoke
```

**请求头**：

```
Authorization: Bearer {access_token}
```

**请求参数（可选）**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| token | string | 否 | 要撤销的令牌，不传则撤销当前token |

---

### 3.7 令牌检查

检查令牌是否有效。

**请求地址**：

```
POST /oauth/introspect
```

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| token | string | 是 | 要检查的令牌 |

**响应示例**：

```json
{
    "code": 200,
    "message": "成功",
    "data": {
        "active": true,
        "client_id": "demo_app",
        "user_id": 1,
        "username": "testuser",
        "scope": "basic,balance",
        "expires_in": 3600,
        "token_type": "Bearer"
    },
    "timestamp": 1719000000
}
```

---

### 3.8 发送短信验证码（OAuth登录页）

用于OAuth登录页面的手机号注册/登录。

**请求地址**：

```
POST /oauth/send_sms
```

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| phone | string | 是 | 手机号 |
| client_id | string | 是 | 应用ID |

**响应示例**：

```json
{
    "code": 200,
    "message": "发送成功",
    "data": {
        "success": true,
        "message": "验证码已发送"
    },
    "timestamp": 1719000000
}
```

> 注意：测试模式下，验证码会在响应中返回。

---

## 4. 用户认证 API

所有需要鉴权的接口，都需要在请求头中携带：

```
Authorization: Bearer {access_token}
```

### 4.1 用户注册

**请求地址**：

```
POST /api/auth/register
```

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| username | string | 是 | 用户名，4-20位字母数字下划线 |
| email | string | 是 | 邮箱 |
| password | string | 是 | 密码，至少6位 |
| nickname | string | 否 | 昵称，默认同用户名 |
| phone | string | 否 | 手机号 |

**响应示例**：

```json
{
    "code": 200,
    "message": "注册成功",
    "data": {
        "user_id": 1,
        "username": "testuser"
    },
    "timestamp": 1719000000
}
```

---

### 4.2 用户登录

获取用户自己的访问令牌（非OAuth模式）。

**请求地址**：

```
POST /api/auth/login
```

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| username | string | 是 | 用户名或邮箱 |
| password | string | 是 | 密码 |

**响应示例**：

```json
{
    "code": 200,
    "message": "登录成功",
    "data": {
        "access_token": "abcdef123456...",
        "token_type": "Bearer",
        "expires_in": 7200,
        "user": {
            "id": 1,
            "username": "testuser",
            "email": "test@example.com",
            "nickname": "测试用户",
            "balance": "100.00"
        }
    },
    "timestamp": 1719000000
}
```

---

### 4.3 退出登录

**请求地址**：

```
POST /api/auth/logout
```

**需要鉴权**：是

---

### 4.4 获取用户信息

**请求地址**：

```
GET /api/auth/user_info
```

**需要鉴权**：是

**响应示例**：

```json
{
    "code": 200,
    "message": "获取成功",
    "data": {
        "user": {
            "id": 1,
            "username": "testuser",
            "email": "test@example.com",
            "phone": null,
            "nickname": "测试用户",
            "avatar": null,
            "balance": "100.00",
            "status": 1,
            "created_by_client": null,
            "realname": null,
            "email_verified": 0,
            "phone_verified": 0,
            "last_login_at": "2024-06-30 12:00:00"
        }
    },
    "timestamp": 1719000000
}
```

---

### 4.5 更新个人资料

**请求地址**：

```
POST /api/auth/update_profile
```

**需要鉴权**：是

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| nickname | string | 否 | 昵称 |
| avatar | string | 否 | 头像URL |
| phone | string | 否 | 手机号 |
| realname | string | 否 | 真实姓名 |
| idcard | string | 否 | 身份证号 |

---

### 4.6 发送验证码

**请求地址**：

```
POST /api/auth/send_code
```

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| type | string | 是 | 类型：`email_code` / `phone_code` / `reset_password` |
| target | string | 是 | 目标：邮箱或手机号 |

**响应示例**：

```json
{
    "code": 200,
    "message": "发送成功",
    "data": {
        "success": true,
        "message": "验证码已发送"
    },
    "timestamp": 1719000000
}
```

> 注意：开发环境返回验证码明文，生产环境不返回。

---

### 4.7 找回密码

**请求地址**：

```
POST /api/auth/forgot_password
```

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| target | string | 是 | 邮箱或手机号 |
| code | string | 是 | 验证码 |
| new_password | string | 是 | 新密码 |

---

### 4.8 修改密码

**请求地址**：

```
POST /api/auth/reset_password
```

**需要鉴权**：是

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| old_password | string | 是 | 原密码 |
| new_password | string | 是 | 新密码 |

---

## 5. 余额管理 API

### 5.1 查询余额

**请求地址**：

```
GET /api/balance/get
```

**需要鉴权**：是

**需要权限**：`basic` 或 `balance`

**响应示例**：

```json
{
    "code": 200,
    "message": "获取成功",
    "data": {
        "user_id": 1,
        "username": "testuser",
        "balance": "100.00"
    },
    "timestamp": 1719000000
}
```

---

### 5.2 余额变动记录

**请求地址**：

```
GET /api/balance/logs
```

**需要鉴权**：是

**需要权限**：`basic` 或 `balance`

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| page | int | 否 | 页码，默认1 |
| page_size | int | 否 | 每页数量，默认20，最大100 |
| type | string | 否 | 类型筛选：recharge / consume / adjust / refund |
| start_date | string | 否 | 开始日期，格式：YYYY-MM-DD |
| end_date | string | 否 | 结束日期，格式：YYYY-MM-DD |

**响应示例**：

```json
{
    "code": 200,
    "message": "获取成功",
    "data": {
        "total": 100,
        "page": 1,
        "page_size": 20,
        "logs": [
            {
                "id": 1,
                "user_id": 1,
                "type": "recharge",
                "amount": "50.00",
                "balance_before": "50.00",
                "balance_after": "100.00",
                "client_id": "demo_app",
                "order_no": "ORDER20240630001",
                "remark": "充值",
                "created_at": "2024-06-30 12:00:00"
            }
        ]
    },
    "timestamp": 1719000000
}
```

---

### 5.3 余额充值

**请求地址**：

```
POST /api/balance/recharge
```

**需要鉴权**：是

**需要权限**：`recharge`

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| amount | decimal | 是 | 充值金额，必须大于0 |
| order_no | string | 是 | 第三方订单号（用于幂等性校验） |
| remark | string | 否 | 备注 |

**响应示例**：

```json
{
    "code": 200,
    "message": "充值成功",
    "data": {
        "order_no": "ORDER20240630001",
        "amount": "50.00",
        "balance_before": "50.00",
        "balance_after": "100.00"
    },
    "timestamp": 1719000000
}
```

---

### 5.4 余额消费

**请求地址**：

```
POST /api/balance/consume
```

**需要鉴权**：是

**需要权限**：`recharge`

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| amount | decimal | 是 | 消费金额，必须大于0 |
| order_no | string | 是 | 第三方订单号（用于幂等性校验） |
| remark | string | 否 | 备注 |

**响应示例**：

```json
{
    "code": 200,
    "message": "消费成功",
    "data": {
        "order_no": "ORDER20240630002",
        "amount": "20.00",
        "balance_before": "100.00",
        "balance_after": "80.00"
    },
    "timestamp": 1719000000
}
```

---

### 5.5 余额调整（管理员）

**请求地址**：

```
POST /api/balance/adjust
```

**需要鉴权**：是（管理员Token）

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| user_id | int | 是 | 用户ID |
| amount | decimal | 是 | 调整金额（正数增加，负数减少） |
| order_no | string | 是 | 订单号（用于幂等性校验） |
| remark | string | 否 | 备注 |

**响应示例**：

```json
{
    "code": 200,
    "message": "调整成功",
    "data": {
        "order_no": "ADJUST20240630001",
        "amount": "10.00",
        "balance_before": "80.00",
        "balance_after": "90.00"
    },
    "timestamp": 1719000000
}
```

---

## 6. 操作日志 API

### 6.1 获取操作日志

**请求地址**：

```
GET /api/logs/list
```

**需要鉴权**：是

**请求参数**：

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| page | int | 否 | 页码，默认1 |
| page_size | int | 否 | 每页数量，默认20，最大50 |
| action | string | 否 | 操作类型筛选 |
| start_date | string | 否 | 开始日期，格式：YYYY-MM-DD |
| end_date | string | 否 | 结束日期，格式：YYYY-MM-DD |

**响应示例**：

```json
{
    "code": 200,
    "message": "获取成功",
    "data": {
        "total": 50,
        "page": 1,
        "page_size": 20,
        "list": [
            {
                "id": 1,
                "user_id": 1,
                "action": "login",
                "detail": {
                    "ip": "127.0.0.1"
                },
                "ip": "127.0.0.1",
                "created_at": "2024-06-30 12:00:00"
            }
        ]
    },
    "timestamp": 1719000000
}
```

---

## 7. 统一响应格式

所有接口返回统一的 JSON 格式：

```json
{
    "code": 200,
    "message": "操作成功",
    "data": {
        // 业务数据
    },
    "timestamp": 1719000000
}
```

| 字段 | 类型 | 说明 |
|------|------|------|
| code | int | 业务状态码，200表示成功 |
| message | string | 提示信息 |
| data | mixed | 业务数据，可能为对象、数组或null |
| timestamp | int | 服务器时间戳（秒） |

---

## 8. 错误码说明

| HTTP状态码 | 业务code | 说明 |
|-----------|---------|------|
| 200 | 200 | 成功 |
| 400 | 400 | 请求参数错误 |
| 401 | 401 | 未授权/Token无效/用户名密码错误 |
| 403 | 403 | 无权限/账号被禁用 |
| 404 | 404 | 资源不存在/接口不存在 |
| 500 | 500 | 服务器内部错误 |

**常见错误示例**：

```json
{
    "code": 401,
    "message": "Token无效或已过期",
    "data": null,
    "timestamp": 1719000000
}
```

---

## 9. 附录：PHP 接入示例

### 9.1 配置信息

```php
<?php
// 认证中心配置
$auth_config = [
    'base_url' => 'http://auth-center',
    'client_id' => 'your_client_id',
    'client_secret' => 'your_client_secret',
    'redirect_uri' => 'http://your-site/callback.php',
];
```

### 9.2 跳转到授权页

```php
<?php
// login.php
session_start();

$auth_config = require 'config.php';

// 生成随机state防止CSRF
$state = bin2hex(random_bytes(16));
$_SESSION['oauth_state'] = $state;

// 构建授权URL
$auth_url = $auth_config['base_url'] . '/oauth/authorize?' . http_build_query([
    'client_id' => $auth_config['client_id'],
    'redirect_uri' => $auth_config['redirect_uri'],
    'response_type' => 'code',
    'scope' => 'basic,balance',
    'state' => $state,
]);

header("Location: $auth_url");
exit;
```

### 9.3 回调处理

```php
<?php
// callback.php
session_start();

$auth_config = require 'config.php';

// 验证state
if (empty($_GET['state']) || $_GET['state'] !== $_SESSION['oauth_state']) {
    die('状态验证失败');
}
unset($_SESSION['oauth_state']);

// 处理错误
if (isset($_GET['error'])) {
    die('授权失败: ' . $_GET['error']);
}

// 获取授权码
$code = $_GET['code'];

// 用code换取access_token
$token_result = getAccessToken($auth_config, $code);

if ($token_result['code'] != 200) {
    die('获取令牌失败: ' . $token_result['message']);
}

$access_token = $token_result['data']['access_token'];
$refresh_token = $token_result['data']['refresh_token'];

// 获取用户信息
$user_info = callApi($auth_config['base_url'] . '/api/auth/user_info', $access_token);

if ($user_info['code'] != 200) {
    die('获取用户信息失败: ' . $user_info['message']);
}

$auth_user = $user_info['data']['user'];

// 在这里处理本地用户逻辑
// 1. 根据 auth_user['id'] 查找或创建本地用户
// 2. 设置本地登录session
// 3. 跳转到首页

$_SESSION['access_token'] = $access_token;
$_SESSION['refresh_token'] = $refresh_token;
$_SESSION['auth_user'] = $auth_user;

header("Location: /");
exit;

/**
 * 用授权码换取访问令牌
 */
function getAccessToken($config, $code) {
    $url = $config['base_url'] . '/oauth/token';
    
    $data = [
        'grant_type' => 'authorization_code',
        'code' => $code,
        'client_id' => $config['client_id'],
        'client_secret' => $config['client_secret'],
        'redirect_uri' => $config['redirect_uri'],
    ];
    
    return httpPost($url, $data);
}

/**
 * 调用需要鉴权的API
 */
function callApi($url, $access_token, $data = null, $method = 'GET') {
    $headers = [
        'Authorization: Bearer ' . $access_token,
    ];
    
    if ($method === 'GET') {
        if ($data) {
            $url .= '?' . http_build_query($data);
        }
        return httpGet($url, $headers);
    } else {
        return httpPost($url, $data, $headers);
    }
}

/**
 * HTTP GET 请求
 */
function httpGet($url, $headers = []) {
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    $response = curl_exec($ch);
    curl_close($ch);
    return json_decode($response, true);
}

/**
 * HTTP POST 请求
 */
function httpPost($url, $data, $headers = []) {
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
    $headers[] = 'Content-Type: application/json';
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    $response = curl_exec($ch);
    curl_close($ch);
    return json_decode($response, true);
}
```

### 9.4 刷新令牌

```php
<?php
function refreshToken($config, $refresh_token) {
    $url = $config['base_url'] . '/oauth/token';
    
    $data = [
        'grant_type' => 'refresh_token',
        'refresh_token' => $refresh_token,
        'client_id' => $config['client_id'],
        'client_secret' => $config['client_secret'],
    ];
    
    return httpPost($url, $data);
}
```

### 9.5 余额查询示例

```php
<?php
session_start();

$auth_config = require 'config.php';
$access_token = $_SESSION['access_token'];

// 查询余额
$result = callApi(
    $auth_config['base_url'] . '/api/balance/get',
    $access_token
);

if ($result['code'] == 200) {
    echo '余额: ' . $result['data']['balance'];
}
```

---

## 更新日志

| 版本 | 日期 | 说明 |
|------|------|------|
| 1.0.0 | 2024-06-30 | 初始版本，包含OAuth授权、用户认证、余额管理等接口 |
