PHPackages                             rossriley/stack-basic-authentication - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. rossriley/stack-basic-authentication

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

rossriley/stack-basic-authentication
====================================

HTTP Basic Authentication Stack middleware

013PHP

Since Mar 24Pushed 12y ago1 watchersCompare

[ Source](https://github.com/rossriley/stack-basic-authentication)[ Packagist](https://packagist.org/packages/rossriley/stack-basic-authentication)[ RSS](/packages/rossriley-stack-basic-authentication/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

HTTP Basic Authentication Stack Middleware
==========================================

[](#http-basic-authentication-stack-middleware)

A [Stack](http://stackphp.com/) middleware to enable [HTTP Basic Authentication](http://en.wikipedia.org/wiki/Basic_access_authentication) following the [STACK-2 Authentication](http://stackphp.com/specs/STACK-2/) conventions.

Fork Information
================

[](#fork-information)

Package forked from the original work here:

This is an attempt to make it framework agnostic, since the original depends on Silex / Pimple

Installation
------------

[](#installation)

Through [Composer](http://getcomposer.org) as [rossriley/stack-basic-authentication](https://packagist.org/packages/dflydev/stack-basic-authentication).

Usage
-----

[](#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](http://tools.ietf.org/html/rfc1945#section-11).
- **firewall**: A firewall configuration compatible with [dflydev/stack-firewall](https://packagist.org/packages/dflydev/stack-firewall).

```
