A AuthMS API Wiki API Reference iam.tianv.com →

POST /admin/mfa/ip-whitelist

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

MFA `bearerAuth` application/json

Request Body

Schema: dto.CreateIPWhitelistRequest

FieldTypeRequiredExampleConstraintsDescription
cidr string Yes 192.168.1.0/24
label string Yes office network

Responses

StatusDescriptionSchema
201创建成功dto.IPWhitelistDetailResponse
400参数错误gitee_com_linmes_authms_base_dto.SimpleResponse
401未认证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.IPWhitelistDetailResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.IPWhitelistResponse No
message string No
timestamp string No

dto.IPWhitelistResponse

FieldTypeRequiredExampleConstraintsDescription
cidr string No 192.168.1.0/24
created_at string No 2026-05-15T08:00:00Z
enabled boolean No True
id string No wl_abc123
label string No office network
tenant_id string No tnt_001

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No