Sha256: 5791ef96847d67117c2460d4fb1b445f62dd25a9608ae2e5617b99926e82129a

Contents?: true

Size: 1.46 KB

Versions: 1

Compression:

Stored size: 1.46 KB

Contents

Note
====

This is not anywhere near done. It's still using swaths of code just copied straight over from merb, and even some of that doesn't do anything yet.

About
=====

I am not satisfied with any of the current authentication strategies available for rails. I am sure Rails 3 will have something built in, but until then this is what I am going to use. I am spoiled from the way Merb does it, but even then I am not 100% happy with how it works.

Currently, this is untested and very much a copy of how merb does it.

All I really care about:

* Authenticate the session
* Authentication strategies
* Let me use my own model how I want
* Let me do my own controller how I want
* Be easy to setup (as an initializer)
* Don't do anything magical

I hate how all the authentication libraries hide model, controller, view methods from you down in the gem file. I also hate the generators that are impossible to use to update from one version to the next. 

In my mind, the best way to solve this is to not have a ton of necessary methods on anything.

All you need
============

1. UserModel#authenticate
2. Use `ensure_authenticated` in your controller to make sure they are logged in.
3. rescue_from Rails::Authentication::Unauthenticated to catch when they are not logged in.
4. Setup an initializer that sets the UserModel class, etc

Simple.

TODO
====

* Tests
* Remove Mash
* Decide if the status, body, etc should be set by the authentication gem or not (right now it's kinda both)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
myobie-rails-auth-0.0.0 README.markdown