/admin/oauth/clients/{client_id}/clone
克隆指定客户端,返回新凭据(client_secret 仅返回一次)。保留原客户端的 redirect_uris, scopes, grant_types, JWKS 等配置。
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
|---|---|---|---|---|---|---|---|
client_id |
path |
string |
Yes | 源客户端ID |
Responses
| Status | Description | Schema |
|---|---|---|
| 201 | 新客户端(含 client_id 和 client_secret) | dto.CloneClientDetailResponse |
| 400 | 请求参数错误 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 401 | 未认证:请提供有效的 Bearer Token | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 403 | 权限不足:需要管理员权限 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 404 | 客户端不存在或不属于当前租户 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 500 | 服务内部错误 | gitee_com_linmes_authms_base_dto.SimpleResponse |
Referenced Schemas
dto.CloneClientDetailResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
data |
dto.CloneClientResponse |
No | |||
message |
string |
No | |||
timestamp |
string |
No |
dto.CloneClientResponse
克隆客户端的结果,包含新客户端的 secret(仅返回一次)
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
client_auth_methods |
string |
No | ["client_secret_basic","private_key_jwt"] |
||
client_id |
string |
No | app-456 |
||
client_secret |
string |
No | secret_xyz789 |
||
cors_origins |
array of string |
No | ['["https://app.example.com"]'] |
||
fapi_profile |
string |
No | fapi1 |
||
grant_types |
array of string |
No | ['["authorization_code"', '"refresh_token"]'] |
||
id |
string |
No | 01JNXXXXX... |
||
jwks_uri |
string |
No | https://client.example.com/.well-known/jwks.json |
||
name |
string |
No | My Application (clone) |
||
redirect_uris |
array of string |
No | ['["https://app.example.com/callback"]'] |
||
scopes |
array of string |
No | ['["openid"', '"profile"', '"email"]'] |
||
status |
string |
No | active |
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
message |
string |
No | |||
timestamp |
string |
No |