POST /admin/mfa/ip-whitelist

为租户添加一个IP白名单规则(CIDR格式),用于自适应MFA风险评分的IP信任检查。参考:NIST SP 800-63B §5.2 (Risk-based Authentication)。需要管理员权限。

多因素认证 `bearerAuth` application/json

请求体

Schema: service-mfa/internal/handler/dto.CreateIPWhitelistRequest

字段类型必填示例约束描述
cidr string 是 192.168.1.0/24
label string 是 office network

响应

引用的 Schema

service-core/base/dto.SimpleResponse

字段类型必填示例约束描述
code integer 否
message string 否
timestamp string 否

service-mfa/internal/handler/dto.IPWhitelistDetailResponse

字段类型必填示例约束描述
code integer 否
data service-mfa/internal/handler/dto.IPWhitelistResponse 否
message string 否
timestamp string 否

service-mfa/internal/handler/dto.IPWhitelistResponse

字段类型必填示例约束描述
cidr string 否 192.168.1.0/24
created_at string 否 2026-05-15T08:00:00Z
enabled boolean 否 True
id string 否 wl_abc123
label string 否 office network
tenant_id string 否 tnt_001