PHPackages                             ez-php/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. [Framework](/categories/framework)
4. /
5. ez-php/auth

ActiveLibrary[Framework](/categories/framework)

ez-php/auth
===========

Authentication module for the ez-php framework — session and token-based auth with a flexible user provider interface

1.0.1(1mo ago)001MITPHPPHP ^8.5CI passing

Since Mar 15Pushed 1mo agoCompare

[ Source](https://github.com/ez-php/auth)[ Packagist](https://packagist.org/packages/ez-php/auth)[ Docs](https://github.com/ez-php/auth)[ RSS](/packages/ez-php-auth/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (24)Used By (1)

ez-php/auth
===========

[](#ez-phpauth)

Authentication module for the [ez-php framework](https://github.com/ez-php/framework) — session and token-based auth with a flexible user provider interface.

[![CI](https://github.com/ez-php/auth/actions/workflows/ci.yml/badge.svg)](https://github.com/ez-php/auth/actions/workflows/ci.yml)

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

[](#requirements)

- PHP 8.5+
- ez-php/framework 0.\*

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

[](#installation)

```
composer require ez-php/auth
```

Setup
-----

[](#setup)

Register the service provider in your application:

```
$app->register(\EzPhp\Auth\AuthServiceProvider::class);
```

Implement `UserProviderInterface` to connect your user storage:

```
use EzPhp\Auth\UserProviderInterface;

class UserProvider implements UserProviderInterface
{
    public function findById(int|string $id): ?object { ... }
    public function findByCredentials(array $credentials): ?object { ... }
    public function validateCredentials(object $user, array $credentials): bool { ... }
}
```

Then bind your provider in a service provider:

```
$this->app->bind(UserProviderInterface::class, UserProvider::class);
```

Usage
-----

[](#usage)

```
$auth = $app->make(\EzPhp\Auth\Auth::class);

// Authenticate
if ($auth->attempt(['email' => $email, 'password' => $password])) {
    $user = $auth->user();
}

// Protect routes with middleware
$router->get('/dashboard', $handler)->middleware(\EzPhp\Auth\Middleware\AuthMiddleware::class);
```

License
-------

[](#license)

MIT — [Andreas Uretschnig](mailto:andreas.uretschnig@gmail.com)

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance91

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 88.5% 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 ~0 days

Total

23

Last Release

46d ago

Major Versions

0.9.3 → 1.0.02026-03-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/a15a63c46d239d42b8ed4c2fe9adbc5fe99eb62f6e5bb90f08021e0c068e8b37?d=identicon)[AU9500](/maintainers/AU9500)

---

Top Contributors

[![AU9500](https://avatars.githubusercontent.com/u/122030400?v=4)](https://github.com/AU9500 "AU9500 (100 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (13 commits)")

---

Tags

phpframeworkauthAuthenticationez-php

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ez-php-auth/health.svg)

```
[![Health](https://phpackages.com/badges/ez-php-auth/health.svg)](https://phpackages.com/packages/ez-php-auth)
```

###  Alternatives

[digitalstars/simplevk

Powerful PHP library/framework for VK API bots, supporting LongPoll &amp; Callback &amp; OAuth

883.9k3](/packages/digitalstars-simplevk)

PHPackages © 2026

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