{"repo":"tuupola/slim-basic-auth","free":true,"listed":false,"github":"https://github.com/tuupola/slim-basic-auth","clone":"git clone https://github.com/tuupola/slim-basic-auth.git","description":"PSR-7 and PSR-15 HTTP Basic Authentication Middleware","language":"PHP","stars":442,"topics":["middleware","authentication","psr-7","psr-15","php"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"[!IMPORTANT] This package is abandoned. See jimtools/basic-auth for replacement. PSR-7 and PSR-15 Basic Auth Middleware This middleware implements HTTP Basic Authentication. It was originally developed for Slim but can be used with all frameworks using PSR-7 or PSR-15 style middlewares. It has been tested with Slim Framework and Zend Expressive. Heads up! You are reading documentation for 3.x branch which is PHP 7.1 and up only. If you are using older version of PHP see the 2.x branch. These two branches are not backwards compatible, see UPGRADING for instructions how to upgrade. Install Install latest version using composer. Usage Configuration options are passed as an array. Only mandatory parameter is users . This is an array where you pass one or more \"username\" = \"password\" combinations. Username is the key and password is the value. Same with Zend Expressive. Rest of the examples assume you are using Slim Framework. Cleartext passwords are only good for quick testing. You probably want to use hashed passwords. Hashed password can be generated with htpasswd command line tool or password hash() PHP function Even if you are using hashed passwords it is not the best idea to store credentials in the code. Instead you could store them in environment or external file which is not committed to GitHub. Optional parameters Path The optional path parameter allows you to specify the protected part of your website. It can be either a string or an array. You do not need to specify ea","default_branch":null,"files":null,"tree":[],"storefront":"/r/tuupola","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tuupola/slim-basic-auth/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}