客户身份(CIAM)

修改用户密码

# 请求说明

PUT https://{your_domain}/api/v2/tenant/users/{user_id}/change-password

# 请求头

参数名 中文名称 必须 类型 描述
Authorization 授权 String 格式:Bearer {access_token}
Content-Type 内容类型 String 固定值:application/json; charset=utf-8

# 请求示例

{
  "password":"12345678",
  "must_modify":false
}
1
2
3
4

# 请求参数

参数名 中文名称 必须 类型 描述
user_id 用户ID String 目标用户ID
password 新密码 String
must_modify 下次登录是否要强制修改密码 Boolean 默认为true

# 返回示例

正确示例:
HTTP/1.1 200 OK
Content-Type: application/json
{
  "user_id": "20201028102749564-9082-DC8CD2722"
}


错误示例:
{
  "error_msg": "User not found",
  "error_code": "IDAAS.TENANT.USER.0001"
}
1
2
3
4
5
6
7
8
9
10
11
12
13

# 返回参数

参数名 中文名称 必须 类型 描述
user_id 用户ID String

# 错误码

状态码 错误码 错误信息 处理措施
400 IDAAS.TENANT.USER.0001 User not found 请检查对应用户是否存在
用户未找到
400 IDAAS.TENANT.PWD.0001 The password is used before, cannot be used again 请重新输入密码
不允许使用历史密码
400 IDAAS.TENANT.PWD.0002 Password cannot username in reverse order 请重新输入密码
密码不允许使用用户名的倒写
400 IDAAS.TENANT.PWD.0003 Password cannot contain :username, mobile number, email prefix, name in PinYing 请重新输入密码
密码中不允许包含:用户名、手机号、邮箱前缀、姓名拼音
400 IDAAS.TENANT.PWD.0004 Your password complexity is low, {0} 请重新输入密码
密码复杂度低,{0}
400 IDAAS.TENANT.PWD.0005 The password is weak 请重新输入密码
该密码为弱密码
400 IDAAS.TENANT.PWD.0006 Number of character repeat in password should not exceed {0} 请重新输入密码
密码中最大字符重复数不能超过{0}
400 IDAAS.TENANT.PWD.0007 The password must contain {0} to {1} characters 请重新输入密码
密码长度为{0}~{1}个字符