api - passing http basic auth credentials with backbone.js securely -


I have a test rest API and backbone application and are running. The problem is that I need to send AP login credentials with every API call from backbone. This is not a problem in itself, but this means that I have to store the AP login credentials in the javascript code in my backbone.js. So if someone was curious, they could see the spinal cord / javascript code and could see the API credentials.

But at the same time, I follow the rest of the principles, all API calls should include login information, how to address this spinal cord with no call to release any state from last call ? I hope this is not with the sessions on the server, because it will be against the rest.

I could not find much information on this subject, so I can stop the path.

Why would the session be against the session REST?

The first time you connect to the server, you create a session on the server and connect it with a unique token that you send to the customer as a cookie.

Therefore, in every call on the server the client sends that token when it is certified, thus its proof will not be displayed.


Comments

Popular posts from this blog

Removing From ArrayList, In Loop Based On It's Size, But Breaking After Remove Still Gives OutOfBounds -

c# - Reactive Extensions ControlScheduler -

java - Add color code support to a Bukkit plugin -