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

Abandoned → [windwalker/authentication](/?search=windwalker%2Fauthentication)Windwalker-package[Framework](/categories/framework)

windwalker/authenticate
=======================

Windwalker Authenticate package

2.0.9(10y ago)014LGPL-2.0+PHPPHP &gt;=5.3.10

Since Nov 24Pushed 10y ago3 watchersCompare

[ Source](https://github.com/ventoviro/windwalker-authenticate)[ Packagist](https://packagist.org/packages/windwalker/authenticate)[ Docs](https://github.com/ventoviro/windwalker-authenticate)[ RSS](/packages/windwalker-authenticate/feed)WikiDiscussions master Synced 1mo ago

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

Windwalker Authenticate
=======================

[](#windwalker-authenticate)

Installation via Composer
-------------------------

[](#installation-via-composer)

Add this to the require block in your `composer.json`.

```
{
    "require": {
        "windwalker/authenticate": "~2.0"
    }
}
```

Getting Started
---------------

[](#getting-started)

This is a simple login auth process.

```
public function login($username, $password)
{
    $auth = new Authenticate;

    // Attach methods
    $auth->addMethod(new LocalMethod);
    $auth->addMethod(new MyMethod);

    $credential = new Credential;

    $credential->username = $username;
    $credential->password = $password;

    // Do authenticate
    $result = $auth->authenticate($credential);

    // False means login fail
    if (!$result)
    {
        // Print results to know what happened
        print_r($auth->getResults());

        throw new Exception('Username or password not matched');
    }

    $user = $auth->getCredential();

    return $user;
}
```

Create Custom Methods
---------------------

[](#create-custom-methods)

```
use Windwalker\Authenticate\Method\AbstractMethod;

class MyMethod extends AbstractMethod
{
    public function authenticate(Credential $credential)
    {
        $username = $credential->username;
        $password = $credential->password;

        if (!$username || !$password)
        {
            $this->status = Authenticate::EMPTY_CREDENTIAL;

            return false;
        }

        $user = Database::loadOne(array('username' => $username));

        if (!$user)
        {
            $this->status = Authenticate::USER_NOT_FOUND;

            return false;
        }

        if (!password_verify($password, $user->password))
        {
            $this->status = Authenticate::INVALID_CREDENTIAL;

            return false;
        }

        // Success
        $this->status = Authenticate::SUCCESS;

        // Set some data to Credential
        $credential->bind($user);

        unset($credential->password);

        return true;
    }
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

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

Recently: every ~56 days

Total

11

Last Release

3948d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1639206?v=4)[Simon Asika](/maintainers/asika32764)[@asika32764](https://github.com/asika32764)

---

Top Contributors

[![asika32764](https://avatars.githubusercontent.com/u/1639206?v=4)](https://github.com/asika32764 "asika32764 (3 commits)")

---

Tags

frameworkauthenticatewindwalker

### Embed Badge

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

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

###  Alternatives

[windwalker/renderer

Windwalker Renderer package

864.9M25](/packages/windwalker-renderer)[windwalker/crypt

Windwalker Crypt package

1392.2k6](/packages/windwalker-crypt)

PHPackages © 2026

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