Sha256: f46fc2765789c5a568aeb04594520c57f90eab2fc98857a3c80f6631acfcec9b
Contents?: true
Size: 401 Bytes
Versions: 2
Compression:
Stored size: 401 Bytes
Contents
module BasicAuthentication extend ActiveSupport::Concern included do before_filter :authenticate end private def authenticate if Rails.env.staging? and ENV['BASIC_AUTH_IS_ACTIVE'] == 'yes' authenticate_or_request_with_http_basic do |username, password| username == Settings.basic_auth.username && password == Settings.basic_auth.password end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cybele-1.9.1 | templates/app/controllers/concerns/basic_authentication.rb |
cybele-1.9.0 | templates/app/controllers/concerns/basic_authentication.rb |