/admin/oauth/providers/{name}
更新指定OAuth提供商的配置信息,支持部分更新(仅提交需要修改的字段)。仅管理员可访问。
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
|---|---|---|---|---|---|---|---|
name |
path |
string |
Yes | 提供商名称 |
Request Body
Schema: dto.AdminUpdateProviderRequest
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
auth_url |
string |
No | |||
client_id |
string |
No | |||
client_secret |
string |
No | |||
display_name |
string |
No | |||
redirect_url |
string |
No | |||
scopes |
string |
No | |||
token_url |
string |
No | |||
user_info_url |
string |
No |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | 更新后的提供商信息 | dto.DataResponse-dto_OAuthProviderItem |
| 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.DataResponse-dto_OAuthProviderItem
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
data |
dto.OAuthProviderItem |
No | |||
message |
string |
No | |||
timestamp |
string |
No |
dto.OAuthProviderItem
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
auth_url |
string |
No | https://github.com/login/oauth/authorize |
||
client_id |
string |
No | client-id |
||
created_at |
string |
No | 2026-04-15T10:30:00Z |
||
display_name |
string |
No | GitHub |
||
enabled |
boolean |
No | True |
||
id |
string |
No | prov_abc123 |
||
name |
string |
No | github |
||
redirect_url |
string |
No | https://app.example.com/callback |
||
scopes |
string |
No | ["read:user","user:email"] |
||
tenant_id |
string |
No | tenant_abc123 |
||
token_url |
string |
No | https://github.com/login/oauth/access_token |
||
updated_at |
string |
No | 2026-04-15T10:30:00Z |
||
user_info_url |
string |
No | https://api.github.com/user |
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
message |
string |
No | |||
timestamp |
string |
No |