/admin/oauth/clients/{client_id}/clone
克隆指定客户端,返回新凭据(client_secret 仅返回一次)。保留原客户端的 redirect_uris, scopes, grant_types, JWKS 等配置。
请求参数
| 名称 | 位置 | 类型 | 必填 | 默认值 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|---|---|
client_id |
path |
string |
是 | 源客户端ID |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 201 | 新客户端(含 client_id 和 client_secret) | service-oauth/internal/handler/dto.CloneClientDetailResponse |
| 400 | 请求参数错误 | service-core/base/dto.SimpleResponse |
| 401 | 未认证:请提供有效的 Bearer Token | service-core/base/dto.SimpleResponse |
| 403 | 权限不足:需要管理员权限 | service-core/base/dto.SimpleResponse |
| 404 | 客户端不存在或不属于当前租户 | service-core/base/dto.SimpleResponse |
| 500 | 服务内部错误 | service-core/base/dto.SimpleResponse |
引用的 Schema
service-core/base/dto.SimpleResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |
service-oauth/internal/handler/dto.CloneClientDetailResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
data |
service-oauth/internal/handler/dto.CloneClientResponse |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |
service-oauth/internal/handler/dto.CloneClientResponse
克隆客户端的结果,包含新客户端的 secret(仅返回一次)
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
client_auth_methods |
string |
否 | ["client_secret_basic","private_key_jwt"] |
||
client_id |
string |
否 | app-456 |
||
client_secret |
string |
否 | secret_xyz789 |
||
cors_origins |
array of string |
否 | ['["https://app.example.com"]'] |
||
fapi_profile |
string |
否 | fapi1 |
||
grant_types |
array of string |
否 | ['["authorization_code"', '"refresh_token"]'] |
||
id |
string |
否 | 01JNXXXXX... |
||
jwks_uri |
string |
否 | https://client.example.com/.well-known/jwks.json |
||
name |
string |
否 | My Application (clone) |
||
redirect_uris |
array of string |
否 | ['["https://app.example.com/callback"]'] |
||
scopes |
array of string |
否 | ['["openid"', '"profile"', '"email"]'] |
||
status |
string |
否 | active |