Module: MaquinaNewsletters::BasicAuthentication

Extended by:
ActiveSupport::Concern
Included in:
ApplicationController
Defined in:
app/controllers/concerns/maquina_newsletters/basic_authentication.rb

Overview

Optional HTTP Basic Auth, modeled on rails/mission_control-jobs’ BasicAuthentication concern.

Authentication is NOT the engine’s job by default — it belongs to the host’s base controller (see MaquinaNewsletters.base_controller_class). This concern is a fallback for hosts whose base controller does not authenticate: it only enforces anything when ‘http_basic_auth_enabled` is true. When enabled with a configured user/password it challenges with those; when enabled without credentials it locks everything with a 401 (fail closed).