496: Logout

Test Case #:496

Test Case Name: Logout

System: OpenLMIS

Subsystem: auth

Test case designed by: Paulina Borowa

Design Date:09.08.2016

Short description

Allows user to log-out from the system, returns them to the log-in screen.

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       


 Step

Action

Expected system response

Comment

1

                                                                         

Request a token from authentication service.

     Method: Post:

In URL:http://localhost:8081/oauth/token?grant_type=password&username=admin&password=password


                                                                                              

 Stasus 200 OK,

     access_token id: "197e2d87-ca29-46a2-9484-00f840a8b449"        

                                                 

2

Verify http://localhost:8080/api endpoint is available only for authenticated users:

Method: GET

In URL http://localhost:8080/api/?access_token=197e2d87-ca29-46a2-9484-00f840a8b449



Status 200 Success.

 

3

 

 

 

 

 

 

4

Verify http://localhost:8080/api endpoint is unavailable for unauthenticated users:
Method: GET

In URL http://localhost:8080/api/count?access_token=197e2d87-ca29-46a2-9484-00f840a8b449

 

 Status 401 Unauthorized

 

OpenLMIS: the global initiative for powerful LMIS software