Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/integrity/sinatra-authorization
HTTP Authorization helpers for Sinatra
https://github.com/integrity/sinatra-authorization
Last synced: 27 days ago
JSON representation
HTTP Authorization helpers for Sinatra
- Host: GitHub
- URL: https://github.com/integrity/sinatra-authorization
- Owner: integrity
- Created: 2009-03-19T20:00:41.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2013-12-27T13:25:56.000Z (almost 11 years ago)
- Last Synced: 2024-05-13T21:23:10.936Z (7 months ago)
- Language: Ruby
- Homepage:
- Size: 130 KB
- Stars: 73
- Watchers: 4
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
Awesome Lists containing this project
- awesome-sinatra - Sinatra Authorization - HTTP Authorization helpers for Sinatra. (Authroization)
README
= Sinatra Authorization
HTTP Authorization helpers for Sinatra.
== Example
require "sinatra/authorization"
set :authorization_realm, "Protected zone"
helpers do
def authorize(login, password)
login == "admin" && password == "secret"
end
endget "/" do
"Hello"
endget "/admin" do
login_required"Welcome in protected zone"
end