主题
管理员修改密码
- 管理员修改的密码,下次用户登录时,需要强制修改密码
- 管理员修改的密码,系统不对密码进行强度校验
接口说明
请求URL:http[s]://{网关地址}/minos-platform/user/modifyPwdByManager
请求方式: POST
请求内容类型: application/json
响应内容类型: application/json
请求说明
请求体
| 字段名 | 参数名 | 是否必填 | 类型 | 描述 |
|---|---|---|---|---|
| 用户名(学工号) | userId | M | String | 用户名/学工号,最大20个字符 |
| 用户新密码 | userPwd | M | String | 用户的密码 |
| 用户需要修改密码 | needModifyPwd | O | String | 是: 1(默认) 否:0 如果用户密码规则达标,则无需进入完善资料再次修改密码 |
请求示例
json
{
"userId":"111923123",
"userPwd":"123456",
"needModifyPwd":"1"
}1
2
3
4
5
2
3
4
5
响应说明
响应体
| 参数名 | 类型 | 描述 |
|---|---|---|
| errcode | String | 返回码 |
| errmsg | String | 返回描述 |
响应示例
json
{
"errcode": "0",
"errmsg": "success",
"data": null
}1
2
3
4
5
2
3
4
5
错误码
| 错误码 | 描述 |
|---|---|
| 111001 | 必填参数不能为空 |
| 111002 | 请求参数格式错误 |
| 116005 | 账户不存在 |
Demo
java
// 创建客户端
Client client = new DefaultClient(BASE_URL, APP_ID, APP_SECRET);
// 创建请求对象
ModifyPwdByManagerRequest request = new ModifyPwdByManagerRequest();
request.setUserId("campususertest001");
request.setUserPwd("123456");
BaseResponse response = client.execute(request);
//调用成功,则处理业务逻辑
if (response.isSuccess()) {
//.....
}
System.out.println(String.format("errcode:%s,errmsg:%s",response.getErrcode(),response.getErrmsg()));
Assert.assertTrue(response.isSuccess());1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14

