Angularjs + OAuth + Play 2.0

I am learning Angularjs to create a one-page application for a new project. The backend will be in Scala with the Play 2.0 platform in the REST style API. I would like to use FB, Twitter, Google, OpenId accounts have the ability to register and login, but I do not know much about OAuth and how to make it work with Angular and Play 2.0 (from Of course, I started reading OAuth).

Do you have any ideas on how to achieve this? Are there any tools / tools to handle it? Or a tutorial and examples?

EDIT: As Pere Willeg pointed out, SecureSocial seems to be a good option on the Play side, but it conforms to the MVC pattern (view generated on the server), unlike corner + playback, which is larger than the MVP (or MVVM) + REST api on the server. For Angular, I found Sapling . I have to figure out how to integrate 2.

+7
source share
2 answers

Use Secure Social . The best invention, since sliced ​​bread. True story;)

+1
source

Take a look at http://www.espeo.pl/2012/02/26/authentication-in-angularjs-application

It shows you how to handle protected resources from an Angular perspective, they all start from the client side. I think you could use Secure Social on the server with all your REST APIs for SecureAction on Play! controller.

I need to do something similar, but for now I will use LDAP, since this is the enterprise application that I am creating. Maybe I'll look at a way to create LDAP / AD for security.

+1
source

All Articles