vperyod/simple-lock

Simple low security access restriction/password protection PSR7 middleware

0.1.0 2016-07-29 05:23 UTC

This package is auto-updated.

Last update: 2024-10-29 04:25:38 UTC


README

#vperyod.simple-lock Simple low security access restriction/password protection PSR7 middleware

Latest version Build Status Coverage Status Quality Score

Installation

composer require vperyod/simple-lock

Usage

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
}