sakaiproject/Hilary — pull request #31 by simong (2012-09-10 16:17:59+00:00)
Title: Authentication module.

A new oae- module that brings in passportjs and supports authentication for
* direct login
* twitter
* facebook
* google

It also has support for SSO which hasn't been implemented in this PR though.

Login can be achieved by pointing your browser to
* /api/auth/twitter
* /api/auth/facebook
* /api/auth/google
* or by posting a username/password combo to /api/auth/login

Each tenants has an extra field called 'baseUrl' which is the URL to where providers such as Google, Facebook, .. have to send the users back.
For example, Cambridge would be oae.cam.ac.uk

A Cassandra Session store has been written that connectjs can use to store it's session data in. Underneath is a simple ColumnFamily with 2 columns
sid and data where the sid is a signed hash of the principal_id and data is a stringified json object with the principal_id. This has been tested in a multi-app server environment and works.

The user will be retrieved from Cassandra on each request and will be exposed as an attribute on the request.
ie: In the rest API it's available at request.user