class Patriot::Worker::Servlet::APIServletBase
Public Class Methods
configure(worker, config)
click to toggle source
@param worker [Patriot::Wokrer::Base] @param config [Patriot::Util::Config::Base]
# File lib/patriot/worker/servlet/api_servlet_base.rb, line 27 def self.configure(worker, config) @@worker = worker @@config = config @@username = config.get(Patriot::Util::Config::USERNAME_KEY, "") @@password = config.get(Patriot::Util::Config::PASSWORD_KEY, "") end
Public Instance Methods
protected!()
click to toggle source
require authorization for updating
# File lib/patriot/worker/servlet/api_servlet_base.rb, line 12 def protected! return if authorized? headers['WWW-Authenticate'] = 'Basic Realm="Admin Only"' halt 401, "Not Authorized" end