#vperyod.simple-lock Simple low security access restriction/password protection PSR7 middleware
composer require vperyod/simple-lock
use Vperyod\SimpleLock\LockHandler;
use Vperyod\SimpleLock\Verify\Password;
if ($_ENV['LOCK']) {
$password = new Password($_ENV['LOCK_PW']); // Password Verifier
$lockHandler = new LockHandler($password); // Lock Handler Middleware
$stack->middleware($lockHandler); // Add middleware early
}