- Install via composer
composer require pg/http-auth
- Register extension in
config.neon
:
extensions:
httpAuth: PG\HttpAuth\DI\HttpAuthExtension
Do not forget to register IAuthenticator service.
- Tell which presenters shoul be secured (in case no presenter name given, all presenters are secured). Format -
Module:Module:Presenter
:
simpleHttpAuth:
presenters: [Front:Admin] # Secure presenter class App\FrontModule\Presenters\AdminPresenter