Protect your website with Basic Authentication.

Installs: 6 787

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 7

Forks: 3

Open Issues: 0


3.1.0 2022-04-12 15:01 UTC

This package is auto-updated.

Last update: 2022-05-12 15:11:48 UTC


Allows users to manage Basic Authentication credentials for multiple hostnames and environments.


  • October CMS ^1.1
  • PHP 7.4 or higher


composer require vdlp/oc-basicauthentication-plugin


To configure this plugin execute the following command:

php artisan vendor:publish --provider="Vdlp\BasicAuthentication\ServiceProviders\BasicAuthenticationServiceProvider" --tag="config"

This will create a config/basicauthentication.php file in your app where you can modify the configuration if you don't want to use .env variables.

Enable / disable plugin

By default basic authentication is disabled.

To enable basic authentication, you have to set the env variable to BASIC_AUTHENTICATION_ENABLED to true in your .env file or edit the published config file.

A Note On FastCGI

If you are using PHP FastCGI, HTTP Basic authentication may not work correctly out of the box. The following lines should be added to your .htaccess file:

RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Questions? Need help?

If you have any question about how to use this plugin, please don't hesitate to contact us at octobercms@vdlp.nl. We're happy to help you.