I am working on an asp.net mvc web application, on the view i wrote the following JavaScript which calls an external web service :-
<script type="text/javascript">
$(function() {
$.getJSON("https://MyERPsystem.com/jw/web/json/hr/getsalary/byid?master_username=superadmin&password_hash=9449B5ABCFA9AFDA36B801351ED3DF66&employeeid=A200121",
{
//code goes here
},
function(data) {
$.each(data.items, function(i,item){
//code goes here
});
});
}) </script>
So if the external web service implements https, then does this means that the master_username and password_hash inside the javaScript cannot be seen by external users?
Best Regards
HTTPS secures everything as it leaves the browser until as it enters the server.
The data is protected in transit so external users cannot access it.
It will not protect the data from people who control the browser, i.e. the rightful user and anyone who has compromised the user’s system.