single page application - Securing internal REST service call via JavaScript -


i have public spa calling backend rest service via javascript. how can secure rest service accept calls spa , no other clients or users?

any way can think secure involving storing kind of secret, because spa written in javascript can view source.

the common practice securing api combination of api-key & using ssl (https)

here links point in right direction:

theoretical:

http://www.slideshare.net/jfaustin/securing-your-api (from slide 17 onward) https://security.stackexchange.com/questions/18684/how-to-implement-an-api-key-mechanism

practical:

(.net) http://blogs.msdn.com/b/rjacobs/archive/2010/06/14/how-to-do-api-key-verification-for-rest-services-in-net-4.aspx

also, pluralsight (http://www.pluralsight.com/training)

has amazing videos (unfortunately paid membership) on topic & more!

hope helps


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -