brucec5/ubudget-api — pull request #5 by brucec5 (2013-04-30 04:51:49+00:00)
Title: User creation and login

*Ignore the old pull request for this. It exists in an alternate history, perhaps one in which I ate breakfast yesterday.*

This branch does a couple of things:
* Removes `rack-ssl-enforcer` in favor of using Rails' built in methods of enforcing https.
* Adds the ability to create users and log in users.
* Adds in infrastructure to prevent a non-logged in user from accessing certain API endpoints.

To create a user, `POST` to `/users` with post parameters `username`, `password`, and `password_confirmation`.

To log in, `POST` to `/session` with post parameters `username` and `password`.

Both of these will return a session cookie that must be stored by the app and passed on to subsequent requests to the API.

I left in the `show` and `index` routes on `/users` for now for debugging, but if anyone thinks that it would be best to just remove them now and use the console for that, I'll remove them.