PUT /internal/identity/users/{user_id}/age-classification

内部API:根据出生日期更新用户的年龄分类与未成年标记,供 verification-service 调用。需InternalAPIKeyAuth认证。

未成年人保护 None application/json

请求参数

名称位置类型必填默认值示例约束描述
user_id path string 是 用户ID

请求体

Schema: service-identity/internal/handler/dto.UpdateAgeClassificationRequest

字段类型必填示例约束描述
birth_date string 是 2010-03-15
digital_consent_age integer 否 13
minors_age_threshold integer 否 18

响应

引用的 Schema

service-core/base/dto.DataResponse-service-identity/internal/handler/dto/AuthUserResponse

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

service-identity/internal/handler/dto.AuthUserResponse

认证用户信息

字段类型必填示例约束描述
age_group string 否 年龄分组
birth_date string 否 出生日期 (RFC3339)
created_at string 否 2026-01-01T00:00:00Z 创建时间
email string 否 john@example.com 邮箱
email_verified_at string 否 2026-01-10T08:00:00Z 邮箱验证时间
id string 否 usr_abc123 用户ID
is_minor boolean 否 是否未成年人
last_login_at string 否 2026-04-14T10:30:00Z 最后登录
last_login_ip string 否 192.168.1.1 最后登录IP
locked_until string 否 2026-04-15T12:00:00Z 锁定截止
login_fail_count integer 否 0 失败次数
metadata object 否 扩展元数据
mfa_enabled boolean 否 False 是否启用MFA
mfa_type string 否 totp MFA类型
must_change_password boolean 否 False 需要强制修改密码
password_changed_at string 否 密码最后修改时间
pending_parental_consent boolean 否 是否等待家长同意
phone string 否 13800138000 手机号
phone_verified_at string 否 2026-01-10T08:00:00Z 手机验证时间
status string 否 active 状态
tenant_id string 否 tnt_xyz789 租户ID
updated_at string 否 2026-04-10T14:20:00Z 更新时间
username string 否 john_doe 用户名