This is a simple PHP class that allows for simple authentication. It works similar to using an API key. When a correct password is passed, the matching user will be added to the Php_Simple_Authentication object. Multiple passwords can be configured for multiple users. Users can have any number of custom key/value pairs. Authentication can be done using either the GET or POST.
With that said, this is not meant to be a super secure authentication method. Using POST is recommended. Keep in mind that GET will expose your password over the network and on the web server. So use it sparingly.
A sample of how this works can be found in the sample directory. To try it out clone this repo and run the following.
cd php-simple-authentication/sample/
php -S localhost:80Then navigate to https://localhost:80 in your web browser.