Sha256: 6c2bb33043c220aa10bd276d8e836cdf174c5c3f36ca3d344d0a86fe2e75479b

Contents?: true

Size: 497 Bytes

Versions: 50

Compression:

Stored size: 497 Bytes

Contents

module DiscoApp::Admin::Concerns::AuthenticatedController
  extend ActiveSupport::Concern

  included do

    protect_from_forgery with: :exception
    before_action :authenticate_administrator
    layout 'admin'

  end

  private

    def authenticate_administrator
      authenticate_or_request_with_http_basic do |username, password|
        (not username.blank?) && (not password.blank?) && username == ENV['ADMIN_APP_USERNAME'] && password == ENV['ADMIN_APP_PASSWORD']
      end
    end

end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
disco_app-0.16.1.pre.sidekiq.pre.6.pre.release app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.8.6 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.8.7 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.8.8 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.8.9 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.0 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.1 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.2 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.3 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.4 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.5 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.6 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.7 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.8 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.9 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.10 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.9.11 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.10.0 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.10.1 app/controllers/disco_app/admin/concerns/authenticated_controller.rb
disco_app-0.10.2 app/controllers/disco_app/admin/concerns/authenticated_controller.rb