sinatra / sinatra-book

Tutorial + Cookbook
http://sinatra-org-book.herokuapp.com/
675 stars 163 forks source link

Authentication #21

Closed rkh closed 13 years ago

rkh commented 14 years ago

One of the questions that come up most on IRC is how to do user authentication. I think this should be covered (at least partially).

karmi commented 14 years ago

HTTP-Auth is covered in the Sinatra FAQ (http://www.sinatrarb.com/faq.html#auth), including how to test it.

There are lots of gems/snippets floating around how to do cookie/session based auth, maybe they could be summarized.

Finally, there is http://github.com/hassox/warden for generic auth solution for Rack based apps.

rkh commented 14 years ago

Yeah, I was referring to covering or mentioning either sinatra_authentication, sinatra_warden and/or just warden.

zzak commented 14 years ago

@karmi There is already an example of Rack::Auth::Basic in the book.

I agreed with rkh, warden is a great authentication tool and would like to see it covered in the book, either through the sinatra_warden extension or just as a rack middleware.

burningTyger commented 14 years ago

The book could have a section on different ways of authentication. There is more than one solution and I wrote my own because none of the others really fit my needs.

zzak commented 13 years ago

In addition to:

I think omniauth should be covered.

zzak commented 13 years ago

moving this to contrib