/internal/identity/validate-key
Gateway/其他服务调用此接口验证 API Key 的有效性
请求体
Schema: service-identity/internal/handler/dto.ValidateKeyRequest
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
api_key |
string |
是 |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 200 | 验证成功 | service-identity/internal/handler/dto.ValidateKeyResult |
| 401 | Key 无效 |
引用的 Schema
service-identity/internal/handler/dto.ValidateKeyResult
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
ip_restrictions |
array of |
否 | |||
key_id |
string |
否 | |||
scopes |
array of string |
否 | |||
status |
string |
否 | |||
tenant_id |
string |
否 | |||
user_id |
string |
否 |
service-identity/internal/handler/dto.ipRestrictionDTO
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
id |
string |
否 | |||
label |
string |
否 | |||
status |
string |
否 | |||
value |
string |
否 |