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

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

phauthentic/authentication
==========================

A Framework agnostic Authentication library for PHP

2.0.0(5y ago)22987MITPHPPHP ^7.4|^8.0CI failing

Since Oct 4Pushed 2y ago4 watchersCompare

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

READMEChangelog (6)Dependencies (13)Versions (7)Used By (0)

Authentication
==============

[](#authentication)

[![Software License](https://camo.githubusercontent.com/9897f4467850972a38c7db9a4d38280b8fcdac0ada00e9c8c0a72ecfa8551653/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666f722d7468652d6261646765)](LICENSE)[![Codecov](https://camo.githubusercontent.com/b9a907af83267f23ad6d41dcb3868ab6446f3b04e0b620f9dd82df2e8de51855/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f706861757468656e7469632f61757468656e7469636174696f6e2f6d61737465723f7374796c653d666f722d7468652d6261646765)](https://app.codecov.io/gh/burzum/authentication)[![Code Quality](https://camo.githubusercontent.com/07aec4c79decae033cedd34a7a2d36e52a741ad32e99cd56a70e63d4182f7216/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f506861757468656e7469632f61757468656e7469636174696f6e2f6d61737465722e7376673f7374796c653d666f722d7468652d6261646765)](https://scrutinizer-ci.com/g/Phauthentic/authentication/?branch=master)[![phpstan Level 8](https://camo.githubusercontent.com/549db4446abc2cbaf43c57767c74242df6ba5ee4f8b8898eefa19dacdf14cd48/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068707374616e2d4c6576656c253230382d627269676874677265656e3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/549db4446abc2cbaf43c57767c74242df6ba5ee4f8b8898eefa19dacdf14cd48/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068707374616e2d4c6576656c253230382d627269676874677265656e3f7374796c653d666f722d7468652d6261646765)[![php 8.0](https://camo.githubusercontent.com/3f46f5f4df1497ebbb6c1be77763aa3e7154c835902ad336b0608d2d7f7f6cf4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e302d626c75653f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/3f46f5f4df1497ebbb6c1be77763aa3e7154c835902ad336b0608d2d7f7f6cf4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e302d626c75653f7374796c653d666f722d7468652d6261646765)

This library intends to provide a framework around authentication and user identification. Authorization is a [separate concern](https://en.wikipedia.org/wiki/Separation_of_concerns).

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

[](#installation)

You can install this library using [composer](http://getcomposer.org):

```
composer require phauthentic/authentication

```

Requirements
------------

[](#requirements)

Your application **must** use the [PSR 7 HTTP Message interfaces](https://github.com/php-fig/http-message) for your request and response objects. The whole library is build to be framework agnostic but uses these interfaces as the common API. Every modern and well written framework and application should fulfill this requirement.

- php &gt;= 8.0
- [psr/http-message](https://github.com/php-fig/http-message)

Only if you plan to use the PSR-15 middleware:

- [psr/http-server-handler](https://github.com/php-fig/http-server-handler)
- [psr/http-factory](https://github.com/php-fig/http-factory)
- [psr/http-server-middleware](https://github.com/php-fig/http-server-middleware)

Documentation
-------------

[](#documentation)

- [Architectural Overview](docs/Architecture-Overview.md)
- [Quick Start and Introduction](docs/Quick-start-and-introduction.md)
    - [JWT Example](docs/JWT-Example.md)
- [Authenticators](docs/Authenticators.md)
    - [Session](docs/Authenticators.md#session)
    - [Token](docs/Authenticators.md#token)
    - [JWT](docs/Authenticators.md#jwt)
    - [HTTP Basic](docs/Authenticators.md#httpbasic)
    - [HTTP Digest](docs/Authenticators.md#httpdigest)
    - [Cookie](docs/Authenticators.md#cookie-authenticator-aka-remember-me)
    - [OAuth](docs/Authenticators.md#oauth)
- [Identifiers](docs/Identifiers.md)
    - [Identity Resolvers](docs/Identity-Resolvers.md)
        - [Callback Resolver](docs/Identity-Resolvers.md#callback-resolver)
        - [PDO Statement Resolver](docs/Identity-Resolvers.md#pdo-statement-resolver)
        - [Writing your own Resolver](docs/Identity-Resolvers.md#writing-your-own-resolver)
- [Identity Objects](docs/Identity-Object.md)
- [URL Checkers](docs/URL-Checkers.md)
- [PSR15 Middleware](docs/PSR15-Middleware.md)
- [PSR7 Middleware](docs/PSR7-Middleware.md)

Copyright &amp; License
-----------------------

[](#copyright--license)

Licensed under the [MIT license](LICENSE.txt).

- Copyright (c) [Phauthentic](https://github.com/Phauthentic)
- Copyright (c) [Cake Software Foundation, Inc.](https://cakefoundation.org)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~398 days

Recently: every ~492 days

Total

6

Last Release

789d ago

Major Versions

1.1.1 → 2.0.02021-04-26

2.0.0 → 3.0.0-rc12024-03-17

PHP version history (3 changes)1.0.0-betaPHP ^7.1

2.0.0PHP ^7.4|^8.0

3.0.0-rc1PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0643e6255da841fe65260ec6e263d8908a40a84b884c32e9fc6be6a15e252fa8?d=identicon)[burzum](/maintainers/burzum)

![](https://www.gravatar.com/avatar/8ea7e55d797f61a7a0448f1b88cfd5b855e9644c7909af356a82896587926197?d=identicon)[robertpustulka](/maintainers/robertpustulka)

---

Top Contributors

[![burzum](https://avatars.githubusercontent.com/u/162789?v=4)](https://github.com/burzum "burzum (692 commits)")[![robertpustulka](https://avatars.githubusercontent.com/u/7437773?v=4)](https://github.com/robertpustulka "robertpustulka (352 commits)")[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (220 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (166 commits)")[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (48 commits)")[![inoas](https://avatars.githubusercontent.com/u/20972207?v=4)](https://github.com/inoas "inoas (38 commits)")[![floriankraemer](https://avatars.githubusercontent.com/u/4996022?v=4)](https://github.com/floriankraemer "floriankraemer (21 commits)")[![rochamarcelo](https://avatars.githubusercontent.com/u/850748?v=4)](https://github.com/rochamarcelo "rochamarcelo (20 commits)")[![josegonzalez](https://avatars.githubusercontent.com/u/65675?v=4)](https://github.com/josegonzalez "josegonzalez (10 commits)")[![jeremyharris](https://avatars.githubusercontent.com/u/184903?v=4)](https://github.com/jeremyharris "jeremyharris (8 commits)")[![cleptric](https://avatars.githubusercontent.com/u/6617432?v=4)](https://github.com/cleptric "cleptric (6 commits)")[![davidyell](https://avatars.githubusercontent.com/u/49889?v=4)](https://github.com/davidyell "davidyell (4 commits)")[![saeideng](https://avatars.githubusercontent.com/u/8215801?v=4)](https://github.com/saeideng "saeideng (4 commits)")[![stickler-ci](https://avatars.githubusercontent.com/u/16011037?v=4)](https://github.com/stickler-ci "stickler-ci (4 commits)")[![ceeram](https://avatars.githubusercontent.com/u/111448?v=4)](https://github.com/ceeram "ceeram (2 commits)")[![ndm2](https://avatars.githubusercontent.com/u/5031606?v=4)](https://github.com/ndm2 "ndm2 (2 commits)")[![fiste788](https://avatars.githubusercontent.com/u/1515782?v=4)](https://github.com/fiste788 "fiste788 (2 commits)")[![littleylv](https://avatars.githubusercontent.com/u/16814596?v=4)](https://github.com/littleylv "littleylv (2 commits)")[![johanmeiring](https://avatars.githubusercontent.com/u/1214876?v=4)](https://github.com/johanmeiring "johanmeiring (2 commits)")

---

Tags

agnostic-implementationagnostic-to-frameworksauthenticationauthentication-frameworkauthentication-middlewareauthentication-serviceform-authenticationhttp-authenticationidentityjwtjwt-authenticationldapldap-authenticationlibraryloginphp-librayphp7psrpsr-15user-authenticationmiddlewareauthAuthenticationlibrary

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[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.6k136.0M248](/packages/league-oauth2-server)[cakephp/authentication

Authentication plugin for CakePHP

1153.6M67](/packages/cakephp-authentication)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)[dyorg/slim-token-authentication

Slim 3.0+ Token Authentication Middleware

78106.5k](/packages/dyorg-slim-token-authentication)[yiisoft/yii-middleware

Yii Middleware

21151.3k1](/packages/yiisoft-yii-middleware)[ecphp/cas-lib

CAS Lib, a standard library for CAS authentication.

18166.9k4](/packages/ecphp-cas-lib)

PHPackages © 2026

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