/oauth/register/{client_id}
OAuth 2.0 动态客户端注册更新端点。使用 Registration Access Token 更新客户端元数据(redirect_uris, grant_types, scope, JWKS 等)。参考:RFC 7591 §2.2 (Client Update Request)。
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
|---|---|---|---|---|---|---|---|
client_id |
path |
string |
Yes | 客户端ID | |||
Authorization |
header |
string |
Yes | Bearer <registration_access_token> |
Request Body
Schema: dto.ClientRegistrationUpdateRequest
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
application_type |
string |
No | |||
client_name |
string |
No | |||
client_uri |
string |
No | |||
contacts |
array of string |
No | |||
grant_types |
array of string |
No | |||
jwks |
string |
No | |||
jwks_uri |
string |
No | |||
logo_uri |
string |
No | |||
policy_uri |
string |
No | |||
redirect_uris |
array of string |
No | |||
scope |
string |
No | |||
software_id |
string |
No | |||
software_version |
string |
No | |||
token_endpoint_auth_method |
string |
No | |||
tos_uri |
string |
No |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | 更新后的客户端元数据 | dto.ClientRegistrationDetailResponse |
| 400 | invalid_client_metadata:请求元数据无效 | dto.OAuthErrorResponse |
| 401 | invalid_token:缺少或无效的 Registration Access Token。参考:RFC 7591 §2.3。 | dto.OAuthErrorResponse |
| 500 | server_error:更新客户端注册失败 | dto.OAuthErrorResponse |
Referenced Schemas
dto.ClientRegistrationDetailResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
data |
dto.ClientRegistrationResponse |
No | |||
message |
string |
No | |||
timestamp |
string |
No |
dto.ClientRegistrationResponse
OAuth 2.0 Dynamic Client Registration response (RFC 7591 §2.1)
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
application_type |
string |
No | web |
应用类型 | |
client_id |
string |
No | 01JNXXXXX... |
客户端ID | |
client_id_issued_at |
integer |
No | 1715692800 |
客户端ID签发时间 | |
client_name |
string |
No | My Application |
客户端名称 | |
client_secret |
string |
No | sec_abc123... |
客户端密钥 | |
client_secret_expires_at |
integer |
No | 0 |
客户端密钥过期时间(0=永不过期) | |
client_uri |
string |
No | https://app.example.com |
客户端主页URL | |
contacts |
array of string |
No | ['["admin@example.com"]'] |
联系人 | |
grant_types |
array of string |
No | ['["authorization_code"', '"refresh_token"]'] |
授权类型 | |
logo_uri |
string |
No | https://app.example.com/logo.png |
Logo URL | |
policy_uri |
string |
No | https://app.example.com/privacy |
隐私政策URL | |
redirect_uris |
array of string |
No | ['["https://app.example.com/callback"]'] |
回调URI列表 | |
registration_access_token |
string |
No | reg_abc123... |
注册管理Token | |
registration_client_uri |
string |
No | https://authms.example.com/api/v1/oauth/register/app-123 |
注册管理URI | |
scope |
string |
No | openid profile email |
权限范围 | |
token_endpoint_auth_method |
string |
No | client_secret_basic |
认证方法 | |
tos_uri |
string |
No | https://app.example.com/tos |
服务条款URL |
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 |
状态 |