title: Authentication and authorization solution for Padrino
body: <p>I have been programming with both Sinatra and Padrino for quite some time now. However, I am still not able to find the right authentication and authorization solution for Padrino. Let me explain my expectation and what I have already tried out.</p>
  
  <p>With Sinatra, I successfully use the <a href="http://rubygems.org/gems/sinatra-authentication" rel="noreferrer">sinatra-authentication</a> gem along with the <a href="http://rubygems.org/gems/role_model" rel="noreferrer">role_model</a> gem. I generally use the Mongoid ORM for talking to MongoDB. These two gems together let me take care of authetication, protecting routes, checking for roles of the logged in user for applying access control.</p>
  
  <p>sinatra-authentication doesn't work with Padrino - it is very specific to Sinatra. I tried it out multiple times. I have already tried out both omniauth and warden with the corresponding Padrino modules but for one reason or another I am not able to get them to work as simply as the wonderful sinatra-autentication gem.</p>
  
  <p>So - before I can attempt implementing a solution of my own (or porting sinatra-authentication to Padrino) - can anyone suggest any other authentication and authorization solutions? At the moment I don't need anythign fancy - simple database-based authentication will just work perfectly.</p>