Solved
On EC2 instance I am giving wrong credentials for Basic Auth but getting 200 code and with same scenario while doing on local machine it is giving unauthorized exception
Please find the scenario below:

Please find the scenario below:

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.