backside/backside-api — pull request #3 by addisonj (2014-05-25 03:46:13+00:00)
Title: add in auth providers

This PR adds in a auth providers.

First, it breaks out auth into its own module (away from the validator)

Second, there are two implementations:
- TokenAuth, very basic JWT token auth
- UserPassAuth, adds in routes for creating and logging in users, including either sessions or creating JWT tokens.

In order to do this, a few things were added and changed:
- Private get,set,remove methods added to the persistence API, the idea being that its the same style of datastore as the normal methods, but separate from the data and intended for private use
- ability to add routes to the HTTP api via the Auth module. It returns an object that describes the methods and routes, I am not totally sure of this, another option would be to pass the app to the auth module, but I wasn't sure I liked the idea of it being able to change more in the app then just add routes.

With this done, we are ready to start with the RuleValidator