/oauth/refresh
OAuth 2.0 刷新令牌端点。使用 refresh_token 换取新的 access_token 和 refresh_token(轮换)。返回扁平 JSON(无 code/message 信封)。参考:RFC 6749 §6 (Refreshing an Access Token)。
Request Body
Accepts an empty JSON object {}
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | 刷新后的令牌(含新的 access_token 和 refresh_token) | dto.OAuthTokenResponse |
| 400 | invalid_request:请求参数缺失或无效。参考:RFC 6749 §5.2。 | dto.OAuthErrorResponse |
| 401 | invalid_grant:refresh_token 无效或过期。参考:RFC 6749 §5.2。 | dto.OAuthErrorResponse |
Referenced Schemas
dto.AuthorizationDetailDTO
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
actions |
array of string |
No | ['["list_accounts"', '"read_balances"]'] |
操作 | |
constraints |
object |
No | 扩展约束 | ||
data_types |
array of string |
No | ['["account_details"', '"balances"]'] |
数据类型 | |
identifier |
string |
No | account-12345 |
标识符 | |
locations |
array of string |
No | ['["https://example.com/accounts"]'] |
位置 | |
type |
string |
No | account_information |
授权类型 |
dto.OAuthErrorResponse
OAuth标准错误响应
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
error |
string |
No | invalid_request |
错误码 | |
error_description |
string |
No | Missing required parameter |
错误描述 | |
error_uri |
string |
No | https://docs.example.com/errors |
错误URI | |
state |
string |
No | state-123 |
状态 |
dto.OAuthTokenResponse
OAuth令牌响应
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
access_token |
string |
No | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... |
访问令牌 | |
authorization_details |
array of |
No | RAR授权详情 | ||
expires_in |
integer |
No | 3600 |
过期秒数 | |
id_token |
string |
No | eyJhbGci... |
OIDC ID令牌 | |
refresh_token |
string |
No | rt_abc123 |
刷新令牌 | |
scope |
string |
No | openid profile email |
范围 | |
token_type |
string |
No | Bearer |
令牌类型 |