This question was asked to me in an interview. I am searching on the Internet but cannot find a thread that explains this in a way that makes sense to me.
Suppose I have a web service that returns a list of something and available In a public domain (any authority can use this) To ensure security, the User must use a key to access this web service.
How can I use this web service safely in Ajax.
The problem is that I use Ajax to access this web service, any authority can see my private key,
I suggest for encryption, but I have to pass this key in decryption (as I understand it) in the form of What I suggest for the pick file (on the server side) on which I can call this web service, but what if someone directly will access this mediation file (I know what the origin policy is)
I really want to know what is the possible solution to overcome this problem, and what is the best thing to do for a safe ajax call when resting
source
share