aboutsummaryrefslogblamecommitdiffstats
path: root/app/controllers/action_mailbox/base_controller.rb
blob: 680c6a96159fa180277d77bc34ea285ca1d4d0c3 (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