class Rack::Auth::Basic

def call(env)

def call(env)
  auth = Basic::Request.new(env)
  return unauthorized unless auth.provided?
  return bad_request unless auth.basic?
  if valid?(auth)
    env['REMOTE_USER'] = auth.username
    return @app.call(env)
  end
  unauthorized
end

def challenge

def challenge
  'Basic realm="%s"' % realm
end

def valid?(auth)

def valid?(auth)
  @authenticator.call(*auth.credentials)
end