Class: Fluent::BasicAuthHttp

Inherits:
HttpInput
  • Object
show all
Defined in:
lib/fluent/plugin/in_basic_auth_http.rb

Instance Method Summary collapse

Instance Method Details

#on_request(path_info, params) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/fluent/plugin/in_basic_auth_http.rb', line 5

def on_request(path_info, params)
  unless authenticate(params["HTTP_AUTHORIZATION"])
    return ['401 Unauthorized', {'Content-type'=>'text/plain'}, "401 Unauthorized\n"]
  end

  super
end