CORS Stateless REST Service with Facebook Authentication

Introduction

This blog will demonstrate one way to enable authentication with Facebook on a Stateless CORS enabled REST service.

The CORS REST service will be created using the Ninja Framework.

Facebook authentication is via the Facebook JavaScript API.

RestFB is used to consolidate the authentication with the REST Service.

This blog is follows on from previous blogs:

  1. CORS Cross-Origin-Resource-Sharing is detailed here http://outbottle.com/understanding-cross-origin-resource-sharing-cors-by-example/.
  2. Creating the REST Service and HTML5 Client is detailed here http://outbottle.com/cors-stateless-rest-service-with-detached-html5-client/.

This blog focuses on adding authentication using Facebook to the application.

The HTML5 application and NinjaFramework Maven application are available for download at the bottom of this page.

Continue reading “CORS Stateless REST Service with Facebook Authentication”