I have created a sample Web project with username/password authentication using Spring Security framework. The same back end supports also simple RESTful queries (such as GET /private/users/1) which uses the same username/password authentication. This is all working as expected. I have removed database access from the project so this is truly standalone application and should be very easy to extend. I have attached the project zip-file and a simple picture showing different access scenarios.
You need to add Facebook login to this sample Spring project. In the future the user needs to be able to login using username/password or Facebook authentication ("Facebook login button" in [login to view URL]). There are at least two kinds of users: administrators and regular users. The application needs to be configured in such a way that administrators have access to more "directories" or "url paths" compared to the regular users (this already works using username/password). User needs to be able to logout after logging in with Facebook (add a logout button to [login to view URL]). All configuration needs to be done using XML (no Java configuration classes). Solution should use Spring Security and Spring Social frameworks. I'm not interested in pretty layout, you don't have to do any user interface design or html coding (may just a few lines). This project is about the backend solution.
The project needs to work on Tomcat application server. Most likely all dependencies have already been added to the project's [login to view URL] file.
I expect that there are not many new classes or lines configuration, but I require you to comment the changes so I understand what was done and why. I believe I need to ask a few simple questions after you have delivered the implementation, please take this into account (at most 0.5 hours of extra work for you). I have a fairly large project behind this small task, so more work might follow.
New usecases:
Usecase "browser user":
1. Login screen is shown to the user ([login to view URL])
2. User chooses Facebook login
3. Facebook authenticates the user
4. Application backend receives confirmation that the user has been authenticated
5. A private resource (web page) is shown to the user
6. The user (AngularJS client) can call backend REST api using the same authentication access token (correct me if this is not the right way to do this or there is a better way to implement this)
Usecase: "REST api user"
1. User sends REST query requesting a private resource. The query contains Facebook's access token.
2. Backend verifies user's access token using Facebook's API
3. Application backend receives confirmation that the user has been authenticated
4. Backend generates a reply for the REST api request
5. User authentication is saved to "session" so that backend doesn't have to verify the access token every time with Facebook (correct me if this is not the right way to do this)
I've done multiple Facebook integration to company sites (where I have worked as well as freelance). I am also proficient with the FB API having used it for multiple games professionally.
€250 EUR in 2 days
0.0 (0 reviews)
0.0
0.0
5 freelancers are bidding on average €295 EUR for this job