PHPackages                             41man/login-gate-bundle - 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. [Security](/categories/security)
4. /
5. 41man/login-gate-bundle

ActiveSymfony-bundle[Security](/categories/security)

41man/login-gate-bundle
=======================

Checking brute force attacks on site

0.7.1(7y ago)01.9kMITPHP

Since Jan 22Pushed 6y agoCompare

[ Source](https://github.com/41man/LoginGateBundle)[ Packagist](https://packagist.org/packages/41man/login-gate-bundle)[ Docs](https://github.com/anyx/LoginGateBundle)[ RSS](/packages/41man-login-gate-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (13)Versions (12)Used By (0)

LoginGateBundle
===============

[](#logingatebundle)

[![Build Status](https://camo.githubusercontent.com/801c6cb2b952695deb639d7ad928d6cf5d7547e7e9ffec5709cdf98a65c66ebc/68747470733a2f2f7472617669732d63692e6f72672f616e79782f4c6f67696e4761746542756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/anyx/LoginGateBundle)

This bundle detects brute-force attacks on Symfony applications. It then will disable login for attackers for a certain period of time. This bundle also provides special events to execute custom handlers when a brute-force attack is detected.

Compatability
-------------

[](#compatability)

The bundle is since version 0.6 compatible with Symfony 4.

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

[](#installation)

Add this bundle via Composer:

```
composer require anyx/login-gate-bundle

```

Configuration:
--------------

[](#configuration)

Add in app/config/config.yml:

```
login_gate:
    storages: ['orm'] # Attempts storages. Available storages: ['orm', 'session', 'mongodb']
    options:
        max_count_attempts: 3
        timeout: 600 #Ban period
        watch_period: 3600 #Only for databases storage. Period of actuality attempts
```

### Register event handler (optional).

[](#register-event-handler-optional)

```
services:
      acme.brute_force_listener:
          class: Acme\BestBundle\Listener\BruteForceAttemptListener
          tags:
              - { name: kernel.event_listener, event: security.brute_force_attempt, method: onBruteForceAttempt }
```

Usage
-----

[](#usage)

In the following example we import the checker via dependency injection in SecurityController.php.

```
namespace App\Controller;

use Anyx\LoginGateBundle\Service\BruteForceChecker;

/**
 * @var BruteForceChecker $bruteForceChecker
 */
private $bruteForceChecker;

/**
 * SecurityController constructor.
 * @param BruteForceChecker $bruteForceChecker
 */
public function __construct(BruteForceChecker $bruteForceChecker)
{
    $this->bruteForceChecker = $bruteForceChecker;
}
```

We can now use the checker to see if a person is allowed to login.

```
$this->bruteForceChecker->canLogin($request)
```

We can also clear the loginattempts when a login is succesful.

```
$this->bruteForceChecker->getStorage()->clearCountAttempts($request);
```

For more examples take a look at the [tests](https://github.com/anyx/LoginGateBundle/tree/master/Tests).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 74.4% 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 ~276 days

Recently: every ~161 days

Total

8

Last Release

2555d ago

### Community

Maintainers

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

---

Top Contributors

[![anyx](https://avatars.githubusercontent.com/u/354352?v=4)](https://github.com/anyx "anyx (32 commits)")[![41man](https://avatars.githubusercontent.com/u/5185200?v=4)](https://github.com/41man "41man (4 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (2 commits)")[![bocharsky-bw](https://avatars.githubusercontent.com/u/3317635?v=4)](https://github.com/bocharsky-bw "bocharsky-bw (1 commits)")[![marliotto](https://avatars.githubusercontent.com/u/770613?v=4)](https://github.com/marliotto "marliotto (1 commits)")[![martijnhartlief](https://avatars.githubusercontent.com/u/12697043?v=4)](https://github.com/martijnhartlief "martijnhartlief (1 commits)")[![snebes](https://avatars.githubusercontent.com/u/666333?v=4)](https://github.com/snebes "snebes (1 commits)")[![adeelnawaz](https://avatars.githubusercontent.com/u/2161678?v=4)](https://github.com/adeelnawaz "adeelnawaz (1 commits)")

---

Tags

securitybrute force

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/41man-login-gate-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/41man-login-gate-bundle/health.svg)](https://phpackages.com/packages/41man-login-gate-bundle)
```

###  Alternatives

[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[anyx/login-gate-bundle

Checking brute force attacks on site

59339.5k](/packages/anyx-login-gate-bundle)[tilleuls/url-signer-bundle

Create and validate signed URLs with a limited lifetime in Symfony

81340.1k](/packages/tilleuls-url-signer-bundle)[maba/gentle-force-bundle

Symfony bundle that integrates gentle-force library for limiting both brute-force attempts and ordinary requests, using leaky/token bucket algorithm, based on Redis

53517.6k1](/packages/maba-gentle-force-bundle)[maba/gentle-force

Library for limiting both brute-force attempts and ordinary requests, using leaky/token bucket algorithm, based on Redis

45591.0k2](/packages/maba-gentle-force)[codeconsortium/ccdn-user-security-bundle

CCDN User Security Bundle

60100.7k](/packages/codeconsortium-ccdn-user-security-bundle)

PHPackages © 2026

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