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

Abandoned → [andreasnij/lockout-authentication](/?search=andreasnij%2Flockout-authentication)ArchivedLibrary[Authentication &amp; Authorization](/categories/authentication)

jandreasn/lockout-authentication
================================

Simple authenticator with lockout.

2.0(4y ago)150.0k↓46.2%MITPHPPHP &gt;=7.4

Since Jun 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/andreasnij/lockout-authentication)[ Packagist](https://packagist.org/packages/jandreasn/lockout-authentication)[ Docs](http://github.com/andreasnij/lockout-authentication)[ RSS](/packages/jandreasn-lockout-authentication/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

Lockout Authenticator
=====================

[](#lockout-authenticator)

[![Latest Stable Version](https://camo.githubusercontent.com/7c9f9b6f95ccee2996a74f37accc3750cf688cc02e284317970536b53abdedb8/68747470733a2f2f706f7365722e707567782e6f72672f616e64726561736e696a2f6c6f636b6f75742d61757468656e7469636174696f6e2f762f737461626c65)](https://packagist.org/packages/andreasnij/lockout-authentication)

This simple PHP authenticator uses the built-in PHP password hashing and verification functions to authenticate user objects implementing the provided interface. It has a lockout mechanism preventing users from logging in for a few seconds after they failed to login multiple times, making brute force attacks less effective.

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

[](#installation)

Add the package as a requirement to your `composer.json`:

```
$ composer require andreasnij/lockout-authenticator
```

Usage
-----

[](#usage)

```
use LockoutAuthentication\Authenticator;

$authenticator = new Authenticator();
if ($authenticator->authenticate($user, $_POST['password'])) {
    // Place code to login user here
    echo 'You are now logged in!';
} elseif ($authenticator->isLoginBlocked()) {
    echo 'Your account has temporarily been locked due to multiple '
        . 'failed login attempts. Try again later.';
} else {
    echo 'The username or password is incorrect!';
}

// Place code to save the $user object to persistent storage here
```

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

[](#requirements)

- Lockout Authenticator requires PHP 7.4 or above.

Author
------

[](#author)

Andreas Nilsson

License
-------

[](#license)

Lockout Authenticator is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

1581d ago

Major Versions

1.0.0 → 2.02022-01-18

PHP version history (2 changes)1.0.0PHP &gt;=5.5.0

2.0PHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

[![andreasnij](https://avatars.githubusercontent.com/u/1712334?v=4)](https://github.com/andreasnij "andreasnij (10 commits)")

---

Tags

authenticationphpphp-authenticationAuthenticationauthenticator

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/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.6k136.0M248](/packages/league-oauth2-server)[league/oauth2-client

OAuth 2.0 Client Library

3.8k118.6M1.2k](/packages/league-oauth2-client)[robthree/twofactorauth

Two Factor Authentication

1.2k10.5M66](/packages/robthree-twofactorauth)[google/auth

Google Auth Library for PHP

1.4k272.7M162](/packages/google-auth)[pragmarx/google2fa

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

2.0k82.4M164](/packages/pragmarx-google2fa)

PHPackages © 2026

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