PHPackages                             redcatphp/identify - 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. redcatphp/identify

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

redcatphp/identify
==================

Identify - Complete Authentication System, Session Management and Cryptographic libraries

v1.6.0(9y ago)48001LGPL-3.0+PHPPHP &gt;=5.4.0

Since Aug 20Pushed 7y ago2 watchersCompare

[ Source](https://github.com/redcatphp/identify)[ Packagist](https://packagist.org/packages/redcatphp/identify)[ Docs](http://redcatphp.com/identify-user)[ RSS](/packages/redcatphp-identify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (7)Used By (1)

**No longer actively maintained.**

Identify
========

[](#identify)

Identify is a complete authentication system with session management and cryptographic libraries. It including many third-party library.

Session
-------

[](#session)

The surikat session handler is independent from native php session and use a strong random id cookie which is regenerated when *$cookieLifetime* expire. Unlike native php session it allow you to use a session over any length you want, like one year for example, and it integrate an anti-bruteforce system with attempts records based on hashed ip.

```
$name = 'redcat';
$cookieLifetime = 3600; // 1 hour
$sessionLifetime = 43200;  // 1 year
$session = new \\RedCat\\Identify\\Session($name,$cookieLifetime,$sessionLifetime);
if(isset($session['var']))
    var\_dump( $session['var'] );
$session['var'] = 'value';
            
```

Auth
----

[](#auth)

Here is the main authentication API which you can use with Auth class.

### login

[](#login)

```
$auth->login($login, $password, $lifetime=0);
            
```

### loginRoot

[](#loginroot)

```
$auth->loginRoot($password,$lifetime=0);
            
```

### loginPersona

[](#loginpersona)

```
$auth->loginPersona($email,$lifetime=0);
            
```

### register

[](#register)

```
$auth->register($email, $login, $password, $repeatpassword, $name=null);
            
```

### activate

[](#activate)

```
$auth->activate($key);
            
```

### requestReset

[](#requestreset)

```
$auth->requestReset($email);
            
```

### logout

[](#logout)

```
$auth->logout();
            
```

### getHash

[](#gethash)

```
$auth->getHash($string, $salt);
            
```

### getUID

[](#getuid)

```
$auth->getUID($login);
            
```

### getUser

[](#getuser)

```
$auth->getUser($uid);
            
```

### deleteUser

[](#deleteuser)

```
$auth->deleteUser($uid, $password);
            
```

### validateLogin

[](#validatelogin)

```
$auth->validateLogin($login);
            
```

### validateDisplayname

[](#validatedisplayname)

```
$auth->validateDisplayname($login);
            
```

### resetPass

[](#resetpass)

```
$auth->resetPass($key, $password, $repeatpassword);
            
```

### resendActivation

[](#resendactivation)

```
$auth->resendActivation($email);
            
```

### changePassword

[](#changepassword)

```
$auth->changePassword($uid, $currpass, $newpass, $repeatnewpass);
            
```

### getEmail

[](#getemail)

```
$auth->getEmail($uid);
            
```

### changeEmail

[](#changeemail)

```
$auth->changeEmail($uid, $email, $password);
            
```

### getRight

[](#getright)

```
$auth->getRight();
            
```

### setRight

[](#setright)

```
$auth->setRight($r);
            
```

### connected

[](#connected)

```
$auth->connected();
            
```

### allowed

[](#allowed)

```
$auth->allowed($d);
            
```

### allow

[](#allow)

```
$auth->allow($d);
            
```

### deny

[](#deny)

```
$auth->deny($d);
            
```

### lock

[](#lock)

```
$auth->lock($r,$redirect=true);
            
```

AuthServer
----------

[](#authserver)

First parameter correspond to *RedCat\\Identify\\Auth* rights constants. You can use them directly, or if you use string (like in example) it will be automaticaly converted to corresponding constant. The rights constants are Auth::RIGHT\_MANAGE, Auth::RIGHT\_EDIT, Auth::RIGHT\_MODERATE, Auth::RIGHT\_POST.
The second parameter (true by default) is for enable GET redirection to avoid re-POST on refresh.

```
$authServer = new \\RedCat\\Identify\\AuthServer;
$authServer->htmlLock('RIGHT\_MANAGE',true);
            
```

Following example is for use inside a code (off course with [ob-implicit-flush](http://php.net/manual/en/function.ob-implicit-flush.php) setted to false). It will handle authentication process, from locking with authentication window to logout button ouput. Put the code where you want button to appear.

```
$authServer->lougoutBTN();
            
```

For handle signup and login process:

```
$authServer->action();
            
```

For get identity:

```
$session = $authServer->getSession();
$identity = $session['\_AUTH\_'];
            
```

For handle reset password request:

```
$authServer->resetreq();
            
```

For handle reset password confirmation:

```
$authServer->resetpass();
            
```

For logout:

```
$authServer->getAuth()->logout()
            
```

And, in any context, to get result message:

```
echo $authServer->getResultMessage(true);
            
```

PHPMailer
---------

[](#phpmailer)

PHPMailer - A full-featured email creation and transfer class for PHP.
PHPMailer is a third party toolbox. See the official [PHPMailer](https://github.com/PHPMailer/PHPMailer) and [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples). There is simple facade class in *RedCat\\Identify* namespace for use PHPMailer in simplicity:

```
$mailer = new RedCat\\Identify\\PHPMailer(
    $fromEmail,$fromName,
    $replyEmail,$replyName,
    $host,$port,$username,$passowrd,$secure,
    $sendmail,
    $debug,$exceptions
);
$mailer->mail($email, $subject, $message, $html=true);
            
```

RandomLib
---------

[](#randomlib)

RandomLib - A library for generating random numbers and strings.
RandomLib is a third party toolbox. See the official [RandomLib](https://github.com/ircmaxell/RandomLib)

SecurityLib
-----------

[](#securitylib)

SecurityLib is a third party toolbox (dependency of RandomLib). See the official [SecurityLib](https://github.com/ircmaxell/SecurityLib)

PhpSecLib
---------

[](#phpseclib)

PhpSecLib - PHP Secure Communications Library.
PhpSecLib is a third party cryptography toolbox. See the official [PhpSecLib](https://github.com/phpseclib/phpseclib)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

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

Recently: every ~101 days

Total

6

Last Release

3493d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/085e64547ac1b32cc49f4f6ba5950c35f593f79d8523e2379869ab512eb8a725?d=identicon)[surikat](/maintainers/surikat)

---

Top Contributors

[![devthejo](https://avatars.githubusercontent.com/u/6781828?v=4)](https://github.com/devthejo "devthejo (96 commits)")

---

Tags

securitycryptographyAuthenticationsessioncookieidentifyBruteforce protection

### Embed Badge

![Health badge](/badges/redcatphp-identify/health.svg)

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

###  Alternatives

[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k21.5M69](/packages/hwi-oauth-bundle)[paragonie/sodium_compat

Pure PHP implementation of libsodium; uses the PHP extension if it exists

930131.6M155](/packages/paragonie-sodium-compat)[lusitanian/oauth

PHP 7.2 oAuth 1/2 Library

1.1k23.2M121](/packages/lusitanian-oauth)[scheb/2fa

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

578630.7k1](/packages/scheb-2fa)[virgil/crypto

Virgil is a stack of security libraries (ECIES with Crypto Agility wrapped in Virgil Cryptogram) and all the necessary infrastructure to enable seamless, end-to-end encryption for any application, platform or device. See below for currently available languages and platforms. Get in touch with us to get preview access to our key infrastructure.

3618.0k2](/packages/virgil-crypto)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2011.0k](/packages/alajusticia-laravel-logins)

PHPackages © 2026

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