员工身份(EIAM)

修改用户密码校验原密码

接口

# 权限

身份管理API是以应用维度授权的,在调用接口前需为不同的应用设置接口权限,详情请参考API权限

权限代码 描述
user_all 用户管理接口的读写权限
all 全部接口读写权限

# 请求说明

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

# 请求头

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

# 请求示例

{
  "password":"P@ssw0rd123456",
  "old_password":"P@ssw0rd12345"
}
1
2
3
4

# 请求参数

参数名 中文名称 必须 类型 描述
user_id 用户ID String 目标用户ID
password 新密码 String
old_password 原密码 String

# 返回示例

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

错误示例:
{
  "error_msg": "用户不存在",
  "error_code": "USER.0001"
}
1
2
3
4
5
6
7
8
9
10
11

# 返回参数

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

# 错误码

状态码 错误码 错误信息 处理措施
400 USER.0001 用户不存在 请检查对应用户是否存在
User does not exist
400 PWD.0001 密码不能为空 请检查入参中的密码字段是否为空
Password cannot be empty
400 PWD.0002 密码长度为{0}~{1}个字符 请检查密码的长度是否符合校验规则
Password length is {0}~{1} characters
400 PWD.0003 密码不能与用户名一致 请检查密码是否与用户名一致
Password cannot match username
400 PWD.0004 密码不允许使用用户名的倒写 请检查密码是否使用了用户名的倒写
Password does not allow reverse writing of username
400 PWD.0005 密码不符合校验规则,{0} 请根据密码策略提升密码的复杂度,或是密码中存在不支持的字符
The password does not meet the verification rules, {0}
400 PWD.0006 该密码为弱密码 该密码为弱密码,请更换为其他密码
The password is weak
400 PWD.0007 不允许使用历史密码 改密码为之前使用过的历史密码,请更换
History passwords are not allowed
400 PWD.0008 密码中最大字符重复数不能超过{0}个 请检查密码中最大字符重复数是否超过{0}个
Maximum number of characters to repeat in password cannot exceed {0}
400 PWD.0009 密码中不允许包含:用户名、手机号、邮箱前缀、姓名拼音 请检查密码中是否包含:用户名、手机号、邮箱前缀、姓名拼音
Passwords are not allowed to include: username, mobile phone number, email prefix, name pinyin
400 PWD.0011 原密码不能为空 请检查入参中的原密码字段是否为空
The original password cannot be empty
400 PWD.0014 原密码不正确 请检查输入的原密码是否正确
The old password is incorrect