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