/oauth/pushed-authorization
OAuth 2.0 推送授权请求端点(PAR)。客户端将授权参数提前推送到授权服务器,获取 request_uri 后在授权请求中使用。返回扁平 JSON(无 code/message 信封)。参考:RFC 9126 (Pushed Authorization Requests)。
Request Body
Schema: dto.PushedAuthorizationRequest
Responses
| Status | Description | Schema |
|---|---|---|
| 201 | PAR 响应(含 request_uri 和 expires_in) | dto.PushedAuthorizationResponse |
| 400 | invalid_request:请求参数缺失或无效。参考:RFC 9126。 | dto.OAuthErrorResponse |
| 401 | invalid_client:客户端认证失败。参考:RFC 9126。 | dto.OAuthErrorResponse |
| 500 | server_error:存储授权请求失败。参考:RFC 9126。 | 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.PushedAuthorizationResponse
PAR响应
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
expires_in |
integer |
No | 90 |
过期秒数 | |
request_uri |
string |
No | urn:example:request_uri:xxx |
请求URI |