class DelayedJobMetrics::BasicAuth
Public Instance Methods
call(env, callback)
click to toggle source
# File lib/delayed_job_metrics/http_basic_auth.rb, line 6 def call(env, callback) auth = ::Rack::Auth::Basic::Request.new(env) return unauthorized unless auth.provided? return bad_request unless auth.basic? return callback.call(env) if valid?(auth) unauthorized end