/admin/oauth/clients
创建一个新的 OAuth 客户端,返回凭据(client_secret 仅返回一次)。支持配置 redirect_uris, scopes, grant_types, JWKS, FAPI profile 等。
Request Body
Schema: dto.CreateClientRequest
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
name |
string |
Yes | |||
redirect_uris |
array of string |
Yes | items: 1–None | ||
client_auth_methods |
array of string |
No | |||
fapi_profile |
string |
No | |||
grant_types |
array of string |
No | |||
is_confidential |
boolean |
No | |||
jwks |
string |
No | |||
jwks_uri |
string |
No | |||
logo_url |
string |
No | |||
privacy_policy |
string |
No | |||
scopes |
array of string |
No | |||
terms_url |
string |
No | |||
website |
string |
No |
Responses
| Status | Description | Schema |
|---|---|---|
| 201 | 创建成功(含 client_id 和 client_secret) | dto.CreateClientDetailResponse |
| 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 |
| 500 | 服务内部错误 | gitee_com_linmes_authms_base_dto.SimpleResponse |
Referenced Schemas
dto.CreateClientDetailResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
data |
dto.CreateClientResponse |
No | |||
message |
string |
No |
dto.CreateClientResponse
OAuth客户端创建结果
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
client_auth_methods |
string |
No | ["client_secret_basic","private_key_jwt"] |
||
client_id |
string |
No | app-123 |
||
client_secret |
string |
No | secret_abc123 |
||
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... |
||
is_confidential |
boolean |
No | True |
||
jwks |
string |
No | |||
jwks_uri |
string |
No | https://client.example.com/.well-known/jwks.json |
||
logo_url |
string |
No | https://app.example.com/logo.png |
||
name |
string |
No | My Application |
||
privacy_policy |
string |
No | https://app.example.com/privacy |
||
redirect_uris |
array of string |
No | ['["https://app.example.com/callback"]'] |
||
scopes |
array of string |
No | ['["openid"', '"profile"', '"email"]'] |
||
status |
string |
No | active |
||
terms_url |
string |
No | https://app.example.com/terms |
||
website |
string |
No | https://app.example.com |
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
message |
string |
No | |||
timestamp |
string |
No |