A AuthMS API Wiki API Reference iam.tianv.com →

POST /oauth/pushed-authorization

OAuth 2.0 推送授权请求端点(PAR)。客户端将授权参数提前推送到授权服务器,获取 request_uri 后在授权请求中使用。返回扁平 JSON(无 code/message 信封)。参考:RFC 9126 (Pushed Authorization Requests)。

OAuth None application/json

Request Body

Schema: dto.PushedAuthorizationRequest

FieldTypeRequiredExampleConstraintsDescription
client_id string Yes app-123 客户端ID
redirect_uri string Yes https://app.example.com/callback 回调URI
response_type string Yes code 响应类型
scope string Yes openid profile 范围
authorization_details array of

See dto.AuthorizationDetailDTO

No RAR授权详情
client_secret string No secret_abc123 客户端密钥
code_challenge string No E9Melhoa2Ow... 代码挑战
code_challenge_method string No S256 挑战方法
nonce string No nonce-123 随机数
resources array of

string

No 资源
state string No state-123 状态

Responses

StatusDescriptionSchema
201PAR 响应(含 request_uri 和 expires_in)dto.PushedAuthorizationResponse
400invalid_request:请求参数缺失或无效。参考:RFC 9126。dto.OAuthErrorResponse
401invalid_client:客户端认证失败。参考:RFC 9126。dto.OAuthErrorResponse
500server_error:存储授权请求失败。参考:RFC 9126。dto.OAuthErrorResponse

Referenced Schemas

dto.AuthorizationDetailDTO

FieldTypeRequiredExampleConstraintsDescription
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标准错误响应

FieldTypeRequiredExampleConstraintsDescription
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响应

FieldTypeRequiredExampleConstraintsDescription
expires_in integer No 90 过期秒数
request_uri string No urn:example:request_uri:xxx 请求URI