4 ms·
I would like to see a similar tutorial which also covers authentication and how to add security to your app. There are a few but I want to see a really simple o
by Kiro 13y ago
I would like to see a similar tutorial which also covers authentication and how to add security to your app. There are a few but I want to see a really simple one.
What I don't understand is how you add login while keeping your REST backend stateless. How do you validate the request and make sure that it comes from the correct user and not just someone who forges the request without keeping a state on the server-side? Normally you just add a session.
- ConceitedCode 13y agoThis seems to explain how to do it pretty well using angular. http://www.frederiknakstad.com/authentication-in-single-page-applications-with-angular-js/ http://www.frederiknakstad.com/authentication-in-single-page...
- peterhunt 13y agoThere's a bunch of different ways to do this. For Instagram we use Django's normal login mechanisms which add a session cookie. Our calls to the REST backend include this cookie. It works pretty well for us. I think Facebook.com does something similar.
- Cthulhu_ 13y agoOur web application / REST API actually uses two systems; for employees, it uses HTTP basic authentication, which is validated to LDAP via Spring Security. For customers, there's a security proxy in between the front-end and our API (IBM's WebSeal), so authentication's handled completely outside of our REST API. Just a couple ideas.