Reset Two-Factor Authentication Secret

PUT/zstack/v1/twofactorauthentication/secrets

Headers

Authorization: OAuth the-session-uuid

Body

{
  "resetTwoFactorAuthenticationSecret": {
    "name": "user1",
    "password": "password",
    "type": "ldap"
  },
  "systemTags": [],
  "userTags": []
}

In the preceding example, the systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"resetTwoFactorAuthenticationSecret":{"name":"user1","password":"password","type":"ldap"}}' \
http://localhost:8080/zstack/v1/twofactorauthentication/secrets

Parameters

Name

Type

Location

Description

Valid Values

Since

name

String

body(contained in the resetTwoFactorAuthenticationSecret structure)

Resource name

 

4.10.0

password

String

body(contained in the resetTwoFactorAuthenticationSecret structure)

 

 

4.10.0

captchaUuid (optional)

String

body(contained in the resetTwoFactorAuthenticationSecret structure)

 

 

4.10.0

verifyCode (optional)

String

body(contained in the resetTwoFactorAuthenticationSecret structure)

 

 

4.10.0

system Tags (optional)

List

body

System tags

 

4.10.0

userTags (optional)

List

body

User tags

 

4.10.0

type

String

body(contained in the resetTwoFactorAuthenticationSecret structure)

 

  • account
  • ldap

5.0.0

SDK Example

Java SDK

ResetTwoFactorAuthenticationSecretAction action = new ResetTwoFactorAuthenticationSecretAction();
action.name = "user1";
action.password = "password";
action.type = "ldap";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ResetTwoFactorAuthenticationSecretAction.Result res = action.call();

Python SDK

action = ResetTwoFactorAuthenticationSecretAction()
action.name = "user1"
action.password = "password"
action.type = "ldap"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()