Created
November 2, 2012 17:40
-
-
Save anonymous/4003039 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rack/lobster' | |
class MyBasic < Rack::Auth::Basic | |
def valid?(auth) | |
@authenticator.call(auth.credentials[0], auth.credentials[1], auth.request) | |
end | |
end | |
use Rack::ShowExceptions | |
use MyBasic, "Lobster 2.0" do |username, password| | |
'secret' == password | |
end | |
run Rack::Lobster.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment