Module: Sinatra::Authorization
- Defined in:
- lib/sinatra/authorization.rb
Overview
HTTP Authorization helpers for Sinatra.
In your helpers module, include Sinatra::Authorization and then define an #authorize(user, password) method to handle user provided credentials.
Inside your events, call #login_required to trigger the HTTP Authorization window to pop up in the browser.
Code adapted from Ryan Tomayko and Christopher Schneid, shared under an MIT License