Skip to content

LUYA Module to replace the htaccess basic auth as it does not work in angular context.

License

Notifications You must be signed in to change notification settings

luyadev/luya-module-basicauth

Repository files navigation

BASIC AUTH LUYA MODULE

LUYA Tests Total Downloads Latest Stable Version Test Coverage

Adds the typical htaccess auth dialog before each request. This module is made as angular does have problems with basic htaccess authentifications in the administration area.

Installation & Usage

Add the luyadev/luya-module-basicauth package to your composer config:

composer require luyadev/luya-module-basicauth

Add the module to your configuration in the modules section.

'modules' => [
    //...
    'basicauth' => [
        'class' => 'luya\basicauth\Module',
        'password' => '<DEFINE_THE_PASSWORD_HERE>',
    ]
]

As the module checks the authentication status on before each request, you have to bootstrap the module inside the bootstrap section of your config:

'bootstrap' => [
    'basicauth',
],

All frontend requests are now protected with your entered password from the config.