PHPackages                             vakata/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. vakata/authentication

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

vakata/authentication
=====================

PHP authentication library

3.6.4(1y ago)15.6k↓83.3%1MITPHPCI failing

Since Mar 21Pushed 1y ago2 watchersCompare

[ Source](https://github.com/vakata/authentication)[ Packagist](https://packagist.org/packages/vakata/authentication)[ Docs](https://github.com/vakata/authentication)[ RSS](/packages/vakata-authentication/feed)WikiDiscussions master Synced 2d ago

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

authentication
==============

[](#authentication)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0153893b82249afc1c9a2f746d3a01abdc79612a097401f885998f51a00f4f11/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76616b6174612f61757468656e7469636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vakata/authentication)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/aa9865c6207f96e0a8e86fb2ca1863eddb72ebceef59013e14c5588cb0e40a66/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f76616b6174612f61757468656e7469636174696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/vakata/authentication)[![Code Climate](https://camo.githubusercontent.com/c2fb9bcfd8b064f74406e9a8be76c72223b8c3c997e923d1ff87ce01c8b3a65b/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f76616b6174612f61757468656e7469636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/vakata/authentication)[![Tests Coverage](https://camo.githubusercontent.com/b852281da5dc2919c250b56063226200df11b1b391c998645c01850cdbab60c9/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f636f7665726167652f6769746875622f76616b6174612f61757468656e7469636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/vakata/authentication)

PHP authentication.

Install
-------

[](#install)

Via Composer

```
$ composer require vakata/authentication
```

Usage
-----

[](#usage)

```
$auth = new \vakata\authentication\PasswordDatabase($db);
try {
    $token = $auth->authenticate([
        'username' => $req->getPost('username'),
        'password' => $req->getPost('password')
    ]);
} catch (AuthenticationException $e) {
    // process exception
}
// work with $token
```

Read more in the [API docs](docs/README.md)

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [vakata](https://github.com/vakata)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance42

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~58 days

Recently: every ~28 days

Total

57

Last Release

467d ago

Major Versions

1.1.0 → 2.0.02016-08-12

2.6.1 → 3.0.02019-07-05

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/146052?v=4)[Ivan Bozhanov](/maintainers/vakata)[@vakata](https://github.com/vakata)

---

Top Contributors

[![vakata](https://avatars.githubusercontent.com/u/146052?v=4)](https://github.com/vakata "vakata (72 commits)")

---

Tags

Authenticationvakata

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vakata-authentication/health.svg)

```
[![Health](https://phpackages.com/badges/vakata-authentication/health.svg)](https://phpackages.com/packages/vakata-authentication)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.7k51.8M373](/packages/tymon-jwt-auth)[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.7k147.0M290](/packages/league-oauth2-server)[league/oauth2-client

OAuth 2.0 Client Library

3.8k128.7M1.3k](/packages/league-oauth2-client)[google/auth

Google Auth Library for PHP

1.4k294.2M220](/packages/google-auth)[pragmarx/google2fa

A One Time Password Authentication package, compatible with Google Authenticator.

2.0k97.9M240](/packages/pragmarx-google2fa)[paragonie/sodium_compat

Pure PHP implementation of libsodium; uses the PHP extension if it exists

931145.2M179](/packages/paragonie-sodium-compat)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
