aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/action_mailbox/base_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/action_mailbox/base_controller.rb')
-rw-r--r--app/controllers/action_mailbox/base_controller.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/action_mailbox/base_controller.rb b/app/controllers/action_mailbox/base_controller.rb
new file mode 100644
index 0000000000..680c6a9615
--- /dev/null
+++ b/app/controllers/action_mailbox/base_controller.rb
@@ -0,0 +1,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