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

PUT /admin/auth-policies/{tenant_id}

创建或更新指定租户的认证策略(部分更新,未设置的字段保持默认值)

认证策略管理 None application/json

Request Parameters

NameInTypeRequiredDefaultExampleConstraintsDescription
tenant_id path string Yes 租户ID

Request Body

Schema: dto.TenantAuthPolicyRequest

FieldTypeRequiredExampleConstraintsDescription
captcha_enabled boolean No
change_cooldown_minutes integer No
check_breached_passwords boolean No Security Features
cross_tenant_switch_enabled boolean No
device_fingerprint_enabled boolean No
device_trust_duration_hours integer No
expiry_days integer No Password Lifecycle
force_change_on_first_login boolean No
grace_period_days integer No
history_count integer No
lockout_attempts integer No Rate Limit / Lockout
lockout_duration_minutes integer No
login_methods array of

string

No Login Methods
magic_link_enabled boolean No
max_devices_per_user integer No Device
max_length integer No
mfa_enabled boolean No MFA
mfa_enforce_for_all boolean No
mfa_methods array of

string

No
mfa_required_user_role string No
min_length integer No Password Complexity
oauth_providers array of

string

No
passkey_enabled boolean No
passkey_max_credentials integer No
passkey_user_verification string No Passkey
password_transmission string No
pepper_enabled boolean No
refresh_token_rotation boolean No
remember_me_days integer No
require_digits boolean No
require_lowercase boolean No
require_special_chars boolean No
require_uppercase boolean No
session_bind_to_device boolean No
session_concurrent_limit integer No
session_idle_ttl_minutes integer No
session_ttl_minutes integer No Session
silent_challenge_enabled boolean No
sso_providers array of

string

No
web3_enabled boolean No Web3

Responses

StatusDescriptionSchema
200更新后的策略dto.TenantAuthPolicyResponse

Referenced Schemas

dto.TenantAuthPolicyResponse

FieldTypeRequiredExampleConstraintsDescription
captcha_enabled boolean No
change_cooldown_minutes integer No
check_breached_passwords boolean No Security Features
created_at string No
cross_tenant_switch_enabled boolean No
device_fingerprint_enabled boolean No
device_trust_duration_hours integer No
expiry_days integer No Password Lifecycle
force_change_on_first_login boolean No
grace_period_days integer No
history_count integer No
lockout_attempts integer No Rate Limit
lockout_duration_minutes integer No
login_methods array of

string

No Login Methods
magic_link_enabled boolean No
max_devices_per_user integer No Device
max_length integer No
mfa_enabled boolean No MFA
mfa_enforce_for_all boolean No
mfa_methods array of

string

No
mfa_required_user_role string No
min_length integer No Password Complexity
oauth_providers array of

string

No
passkey_enabled boolean No
passkey_max_credentials integer No
passkey_user_verification string No Passkey
password_transmission string No
pepper_enabled boolean No
refresh_token_rotation boolean No
remember_me_days integer No
require_digits boolean No
require_lowercase boolean No
require_special_chars boolean No
require_uppercase boolean No
session_bind_to_device boolean No
session_concurrent_limit integer No
session_idle_ttl_minutes integer No
session_ttl_minutes integer No Session
silent_challenge_enabled boolean No
sso_providers array of

string

No
tenant_id string No
updated_at string No
web3_enabled boolean No Web3