joindin/joind.in — pull request #464 by mvriel (2012-01-16 20:39:37+00:00)
Title: Twitter

This is the pull request for twitter authentication integration; this PR obsoletes / supercedes PR #456 and is a follow up of pull request #463.

PLEASE EXECUTE #463 FIRST: this PR uses method and functions introduced in that PR and refactors those again to eliminate duplication.

PLEASE DISREGARD #456: this is #456 integrated with additional functionality for robustness and to eliminate several bugs in the PR.

Changes:

* Implemented a twitter controller whose request_token method will query the oAuth interface of twitter
* This controller will create a new user if no user with the given screen name exists; if a user does exist with that screen name then the system will log in as that user.
* If a new user is to be created then the system will try to use the screen name as username; if already taken it will append the number 1 and try again; if still unavailable the system will keep incrementing the number is incremented and checking for availability.
* Implemented a base AuthAbstract Controller which allows a unified _login method and adding of a new user.
* Refactored the Facebook stuff to use the new common functions.