I have an web application which have a mini javascript function which access API which needs username and password for authentication. I call the api like the script below.
var api_result = api.auth('myusername','mypassword').get({ some statement });
My problem is what is the best way to encrypt the username and password?
Because at chrome browser this message is being returned:
This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information.