aboutsummaryrefslogblamecommitdiffstats
path: root/app/controllers/action_mailbox/base_controller.rb
blob: 6f0e7e42d1800981d823fca67daa4d52679045fe (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11





                                                                                                   
                                                                               



                                                                               
class ActionMailbox::BaseController < ActionController::Base
  skip_forgery_protection

  private
    def authenticate
      authenticate_or_request_with_http_basic("Action Mailbox") do |given_username, given_password|
        ActiveSupport::SecurityUtils.secure_compare(given_username, username) &
          ActiveSupport::SecurityUtils.secure_compare(given_password, password)
      end
    end
end