javascript - How to Encrypt password for REST API authentication -
there lot resources how secure rest api access, not looking for. going use provided rest api basic authentication (and cannot changed :( ).
obviously can go with:
var requestoptions = { hostname: "rest.api.url.com", path: "/path/", auth: "username:password" }; var req = http.request(requestoptions, function (res) { // code here });
is there way not provide password in plain text in script?
is there way not provide password in plain text in [javascript]?
client-side javascript vulnerable tampering , modification, including reversing "encrypted" passwords store in client-side script. can obfuscate code like, if password present in form in client script, accessible.
i going use provided rest api basic authentication (and cannot changed easily
since can't change rest api use tokens or ssl, 1 solution comes mind have intermediary between server , rest api does use ssl. communicate securely server-side script on server, , have script proxy requests , responses rest api.
resources:
Comments
Post a Comment