The rack-auth-cookie library provides a Rack middleware interface for authenticating users using a cookie
Daniel Berger, Charlie O'Keefe
无