587: Password reset

Test Case #:587

Test Case Name: Passwor reset

System: OpenLMIS

Subsystem: auth

Test case designed by: Paulina Borowa

Design Date:03.08.2016

Short description: As an OpenLMIS System administrator, I can reset a user's password.

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       


Step

Action

Expected system response

Comment

1

                 Request a token from authentication service with some rest client                       Status 200 OK           

Copy the token from response (e.g. {"access_token":"c8a0480b-ca1a-4961-9180-e5ef4a0c605a}"  )                                            

2

Create users

URL: http://localhost:8080/api/users?access_token=c8a0480b-ca1a-4961-9180-e5ef4a0c605a

Method: POST

Example body:

{

    "referenceDataUserId":"49fd58e0-597a-11e6-8b77-86f30ca893d3",

    "username":"UserName1",

    "password":"Password2",

    "email":"soldeveloo@com",

    "role":"ADMIN"

}

Status 201 Created

 

 

3

Create passwordReset

URL: http://localhost:8080/api/users/passwordReset?access_token=c8a0480b-ca1a-4961-9180-e5ef4a0c605a

Method: POST

Example body:

{

    "username": "UserName1",

    "newPassword": "Pass111111111"

}

Status 200 OK

"The password for user UserName1 has been updated."

 

  • Password must be between 8 to 16 characters, should not contain spaces and contain at least 1 number.
  • error message is displayed if password doesn't meet the above parameters
    

OpenLMIS: the global initiative for powerful LMIS software