PHPackages                             crabstudio/authenticate - 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. crabstudio/authenticate

ActiveCakephp-plugin[Authentication &amp; Authorization](/categories/authentication)

crabstudio/authenticate
=======================

Advance Authenticate plugin for CakePHP 3.2+

1.0.1(9y ago)28101MITPHPPHP &gt;=5.6

Since Aug 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/ctlabvn/authenticate)[ Packagist](https://packagist.org/packages/crabstudio/authenticate)[ Docs](https://github.com/crabstudio/authenticate)[ RSS](/packages/crabstudio-authenticate/feed)WikiDiscussions master Synced today

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

[![Build Status](https://camo.githubusercontent.com/b48116add38dbebc11f752d6202ff573b3da3f265b26a75999144f26a08c617c/68747470733a2f2f7472617669732d63692e6f72672f6372616273747564696f2f61757468656e7469636174652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/crabstudio/authenticate) [![Latest Stable Version](https://camo.githubusercontent.com/b7c0429e11029de98e3f331e0ecd2989846c1633b3ffafa2aa995e350a5178a9/68747470733a2f2f706f7365722e707567782e6f72672f6372616273747564696f2f61757468656e7469636174652f762f737461626c65)](https://packagist.org/packages/crabstudio/authenticate) [![Total Downloads](https://camo.githubusercontent.com/ef47404c6c3c8b4a496ffb37c3bf4da36553c0baeff44a3d9372dc6e3160571a/68747470733a2f2f706f7365722e707567782e6f72672f6372616273747564696f2f61757468656e7469636174652f646f776e6c6f616473)](https://packagist.org/packages/crabstudio/authenticate) [![License](https://camo.githubusercontent.com/c57180cd447687f89c00ad8a93b32f52240c2084725033548f012a49c59e6719/68747470733a2f2f706f7365722e707567782e6f72672f6372616273747564696f2f61757468656e7469636174652f6c6963656e7365)](https://packagist.org/packages/crabstudio/authenticate) [![Latest Unstable Version](https://camo.githubusercontent.com/b9ce8ef64dd19b7dbd9d8e3646dd920a8db0312ebbc881b8c83f0658f7a4c569/68747470733a2f2f706f7365722e707567782e6f72672f6372616273747564696f2f61757468656e7469636174652f762f756e737461626c65)](https://packagist.org/packages/crabstudio/authenticate)

Advance Authenticate plugin for CakePHP 3.2+
============================================

[](#advance-authenticate-plugin-for-cakephp-32)

Support me [![paypal](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=anhtuank7c%40hotmail%2ecom&lc=US&item_name=Crabstudio%20CakePHP%203%20%2d%20FlatAdmin%20Skeleton&item_number=crabstudio%2dcakephp%2dskeleton&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#support-me-)

Feature
-------

[](#feature)

- Prevent brute force attack by IP
- Remember/Auto login

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer self-update
composer require crabstudio/authenticate

```

Or add the following lines to your application's **composer.json**:

```
"require": {
    "crabstudio/authenticate": "^1.0"
}

```

followed by the command:

```
composer update

```

Load plugin
-----------

[](#load-plugin)

From command line:

```
bin/cake plugin load Authenticate

```

Or add this line to the end of file **Your\_project\\config\\bootstrap.php**

```
Plugin::load('Authenticate');

```

Configure
---------

[](#configure)

Config Auth component from **AppController.php**

```
// All config key as usual FormAuthenticate/BaseAuthenticate
// I list the different config keys only.

$this->loadComponent('Auth', [
    'authenticate' => [
        'Authenticate.Advance' => [
	        'lockout' => [
	            'retries' => 3,
	            'expires' => '5 minutes',
	            'file_path' => 'prevent_brute_force',
	            'message' => [
	                'locked' => 'You have exceeded the number of allowed login attempts. Please try again in {0}',
	                'login_fail' => 'Incorrect username or password. {0} retries remain. Please try again',
	            ]
	        ],
	        'remember' => [
	            'enable' => true,
	            'key' => 'RememberMe',
	            'expires' => '1 months',
	        ],
        ],
    ]);

```

If you want to store login information to the Cookie, login Form required `checkbox` RememberMe as bellow

Paste this function to the **AppController.php**

```
// remember to import Event to the AppController.php
use Cake\Event\Event;

public function initialize()
{
    parent::initialize();
    $this->loadComponent('Cookie');
}

public function beforeFilter(Event $event)
{
    //Automaticaly Login.
    if (!$this->Auth->user() && $this->Cookie->read('RememberMe')) {
        $user = $this->Auth->identify();
        if ($user) {
            $this->Auth->setUser($user);
        } else {
            $this->Cookie->delete('RememberMe');
        }
    }
}

```

```
// login.ctp template

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

2

Last Release

3622d ago

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

1.0.1PHP &gt;=5.6

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3163410?v=4)[Tuan Nguyen](/maintainers/anhtuank7c)[@anhtuank7c](https://github.com/anhtuank7c)

---

Top Contributors

[![anhtuank7c](https://avatars.githubusercontent.com/u/3163410?v=4)](https://github.com/anhtuank7c "anhtuank7c (12 commits)")

---

Tags

cakephp3authenticatecake3crabstudioanhtuank7cPrevent brute force attack

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/crabstudio-authenticate/health.svg)

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

###  Alternatives

[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

131240.2k13](/packages/dereuromark-cakephp-tinyauth)[admad/cakephp-jwt-auth

CakePHP plugin for authenticating using JSON Web Tokens

163762.9k8](/packages/admad-cakephp-jwt-auth)[crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP projects

20115.8k1](/packages/crabstudio-recaptcha)[xety/cake3-cookieauth

A simple Cake3 plugin to authenticate users with Cookies.

1956.6k2](/packages/xety-cake3-cookieauth)[ivanamat/cakephp3-aclmanager

AclManager plugin for CakePHP 3.x

2715.8k2](/packages/ivanamat-cakephp3-aclmanager)[queencitycodefactory/ldap

LDAP plugin for CakePHP 3.x

1410.0k1](/packages/queencitycodefactory-ldap)

PHPackages © 2026

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