PHPackages                             rafaelgou/php-apache2-basic-auth - 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. rafaelgou/php-apache2-basic-auth

ActiveProject

rafaelgou/php-apache2-basic-auth
================================

PHP Apache2 Basic Auth

v1.0.0(9y ago)33621[3 PRs](https://github.com/rafaelgou/php-apache2-basic-auth/pulls)MITPHP

Since Sep 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rafaelgou/php-apache2-basic-auth)[ Packagist](https://packagist.org/packages/rafaelgou/php-apache2-basic-auth)[ RSS](/packages/rafaelgou-php-apache2-basic-auth/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

PHP Apache2 Basic Auth
======================

[](#php-apache2-basic-auth)

A really simple class service for .htaccess Basic Auth using .htpasswd and .htgroups files.

Original HtPasswd and HtGroup classes from [Yang Yang](http://www.kavoir.com/2012/04/php-class-for-handling-htpasswd-and-htgroup-member-login-user-management.html)

If you want a running app using this lib, see [PHP Apache2 Basic Auth Manager](https://github.com/rafaelgou/php-apache2-basic-auth-manager)

Full API
--------

[](#full-api)

See [API](docs/README.md)

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

[](#installation)

This standard can be installed with the [Composer](https://getcomposer.org/)dependency manager.

1. [Install Composer](https://getcomposer.org/doc/00-intro.md)
2. Install the coding standard as a dependency of your project

```
composer require rafaelgou/php-apache2-basic-auth
```

Using
-----

[](#using)

You need to define a `.htpasswd` file and a optionally a `.htgroups` file.

### Instanciate the Service

[](#instanciate-the-service)

```
