https://github.com/dflydev/dflydev-stack-basic-authentication
HTTP Basic Authentication Stack middleware
https://github.com/dflydev/dflydev-stack-basic-authentication
Last synced: about 1 year ago
JSON representation
HTTP Basic Authentication Stack middleware
- Host: GitHub
- URL: https://github.com/dflydev/dflydev-stack-basic-authentication
- Owner: dflydev
- License: mit
- Created: 2013-07-30T22:18:38.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2018-02-12T11:03:32.000Z (over 8 years ago)
- Last Synced: 2024-08-03T16:29:15.076Z (almost 2 years ago)
- Language: PHP
- Homepage:
- Size: 174 KB
- Stars: 12
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
HTTP Basic Authentication Stack Middleware
==========================================
A [Stack][0] middleware to enable [HTTP Basic Authentication][1] following the
[STACK-2 Authentication][2] conventions.
Installation
------------
Through [Composer][3] as [dflydev/stack-basic-authentication][4].
Usage
-----
The BasicAuthentication middleware accepts the following options:
* **authenticator**: *(required)* A callback used to ensure that the specified
credentials are correct.
* **realm**: The HTTP Basic Authentication realm as defined by [RFC1945][5].
* **firewall**: A firewall configuration compatible with
[dflydev/stack-firewall][6].
```php
[
['path' => '/', 'anonymous' => true],
['path' => '/login'],
],
'authenticator' => $authenticator,
'realm' => 'here there be dragons',
]);
```
Examples
--------
See the `examples/` directory for some live examples of this middleware in
action.
License
-------
MIT, see LICENSE.
Community
---------
If you have questions or want to help out, join us in the **#stackphp** or **#dflydev** channels on **irc.freenode.net**.
[0]: http://stackphp.com/
[1]: http://en.wikipedia.org/wiki/Basic_access_authentication
[2]: http://stackphp.com/specs/STACK-2/
[3]: http://getcomposer.org
[4]: https://packagist.org/packages/dflydev/stack-basic-authentication
[5]: http://tools.ietf.org/html/rfc1945#section-11
[6]: https://packagist.org/packages/dflydev/stack-firewall