Validate User Password
Body
{
"validatePassword": {
"loginName": "test",
"password": "password",
"loginType": "account"
},
"systemTags": [],
"userTags": []
}The systemTags and userTags fields in the above example are optional. They are listed to indicate that the body can contain these two fields.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-X PUT -d '{"validatePassword":{"loginName":"test","password":"password","loginType":"account"}}' \
http://localhost:8080/zstack/v1/password/verifyParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| loginName | String | body (contained in the validatePassword structure) | Username | 4.0.0 | |
| password | String | body (contained in the validatePassword structure) | User password | 4.0.0 | |
| loginType | String | body (contained in the validatePassword structure) | Login type | 4.0.0 | |
| systemTags (optional) | List | body | System tags | 4.0.0 | |
| userTags (optional) | List | body | User tags | 4.0.0 |
API Response
Response Example
{
"available": true
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| available | boolean | Whether the operation is allowed | 4.0.0 |
| success | boolean | 4.0.0 | |
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. See error | 4.0.0 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field. Defaults to null | 0.6 |
| opaque | LinkedHashMap | Reserved field. Defaults to null | 0.6 |
| cause | ErrorCode | Root error. The source error that caused this error. Null if no root cause exists | 0.6 |
SDK Examples
Java SDK
ValidatePasswordAction action = new ValidatePasswordAction();
action.loginName = "test";
action.password = "password";
action.loginType = "account";
ValidatePasswordAction.Result res = action.call();Python SDK
ValidatePasswordAction action = ValidatePasswordAction()
action.loginName = "test"
action.password = "password"
action.loginType = "account"
ValidatePasswordAction.Result res = action.call()