Class: Moirai::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/moirai/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#authenticateObject



7
8
9
10
11
12
13
# File 'app/controllers/moirai/application_controller.rb', line 7

def authenticate
  if basic_auth_present?
    authenticate_or_request_with_http_basic do |name, password|
      name == ENV["MOIRAI_BASICAUTH_NAME"] && password == ENV["MOIRAI_BASICAUTH_PASSWORD"]
    end
  end
end