class SoarAuthentication::Authenticate
Attributes
app[R]
Public Class Methods
new(app)
click to toggle source
# File lib/soar_authentication.rb, line 8 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/soar_authentication.rb, line 12 def call(env) request = Rack::Request.new(env) auth = SoarAuthentication::Authentication.new(request) return [401, {"Content-Type" => "text/html"}, ["401 - Not authenticated"]] if not auth.authenticated? @app.call(env) end