Looking for the right way: Spring Social + Spring RESTful API + Spring WebApp + Mobile clients

I have a RESTful API built using Spring 3.1 using Spring Security. I have a web application as well as a Spring 3.1 MVC application. I plan for mobile clients to access my REST API. Thus, my API is the central place for authentication, data retrieval, etc. All this makes sense so far.

Now what I can’t wrap up is how easy and smart it is to add Spring Social. How did you do that? Perhaps you just moved ConnectionRepository to the API? Or do you have an API? I want, by all means, to prevent double authorization for each client technology (preventing double authorization means that the user connects to facebook in webapp and then starts using our mobile client and DO NOT ask to connect to facebook again only b / c userA is using a different client).

Thank you for sharing your thoughts!

+8
spring spring-mvc spring-security spring-social facebook-oauth
source share
1 answer

The solution that we use to protect our rest-webservices with spring security, with cookie support, remember me the service. It uses well-documented traditional spring protection methods.

Then we connect the spring social to our system, which is then simply registered by the user as usual, using spring secruity. The social api looks up, for example, the facebook id in your db table if it finds existing logs of user connections to the use of their account on your system (and can redirect to the registration page, etc.).

I propose to break this question into more specific areas.

+2
source share

All Articles