Guest User

Untitled

a guest
Apr 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. class TemporaryBasicAuth
  2. def initialize(app)
  3. @app = Rack::Auth::Basic.new(app) do |username,password|
  4. (username == 'someguy') and (password == 'mypassword')
  5. end
  6. @app.realm = "Your realm here"
  7. end
  8. def call(env)
  9. return @app.call(env)
  10. end
  11. end
Add Comment
Please, Sign In to add comment