UAG - Change Password


Data Structures

ChangePasswordModel

Attribute

Type

Required

Description

state

string

Change password state.

password

string

yes

Old or new password depending on state or prompt.

method_id

string

ID of the authentication method whose password is changed. See the section Profile Authentication Methods Management.

PasswordPolicyModel

Attribute

Type

Required

Description

enabled

boolean

Read-only. Whether the password complexity policy is enforced for the user.

min_length

number

Read-only. Minimum password length.

uppercase

number

Read-only. Minimum number of upper case characters.

lowercase

number

Read-only. Minimum number of lower case characters.

digits

number

Read-only. Minimum number of digits.

special

number

Read-only. Minimum number of special characters.

different

boolean

Read-only. Whether the new password must differ from the current one.

Retrieve Available Attributes of the ChangePasswordModel

Request

Method

GET

Path

/api/v2/objspec/change_password

GET /api/v2/objspec/change_password

Example Request

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/objspec/change_password'

Change Password

Request

Method

POST

Path

/api/v2/change-password

Headers

Content-Type: application/json

Body

ChangePasswordModel

POST /api/v2/change-password

Example Request

curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
https://10.0.0.1/api/v2/change-password \
-d '{"password": "new-password"}'

Response

{
    "result": "success"
}

Retrieve Available Attributes of the PasswordPolicyModel 🆕

Request

Method

GET

Path

/api/v2/objspec/password_policy

GET /api/v2/objspec/password_policy

Example Request

curl -s -k -X GET \
  -H 'Authorization: <token>' \
  'https://10.33.4.95/api/v2/objspec/password_policy'

Get Password Policy 🆕

This endpoint returns the password complexity requirements that apply to the calling user, so that a client can check a new password before it sends the password change request. A requirement with the value 0 is not enforced.

Request

Method

GET

Path

/api/v2/profile/password-policy

GET /api/v2/profile/password-policy

Example Request

curl -s -k -X GET \
  -H 'Authorization: <token>' \
  'https://10.33.4.95/api/v2/profile/password-policy'

Response

{
    "result": "success",
    "password_policy": {
        "enabled": true,
        "min_length": 12,
        "uppercase": 1,
        "lowercase": 1,
        "digits": 1,
        "special": 1,
        "different": true
    }
}