PHPackages                             viloveul/auth - 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. viloveul/auth

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

viloveul/auth
=============

Viloveul auth with jwt.

v1.0.6(7y ago)2162MITPHPPHP ~7.0

Since Dec 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/viloveul/auth)[ Packagist](https://packagist.org/packages/viloveul/auth)[ Docs](http://www.viloveul.com)[ RSS](/packages/viloveul-auth/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (7)Dependencies (1)Versions (9)Used By (0)

Installation (this package based on lcobucci/jwt)
=================================================

[](#installation-this-package-based-on-lcobuccijwt)

make sure your php version &gt; 7.0

```
composer require viloveul/auth
```

HOW
---

[](#how)

first you need to generate private key and public key

```
$ openssl genrsa -out private.pem -aes256 4096
$ openssl rsa -pubout -in private.pem -out public.pem
```

add this

```
require __DIR__ . '/vendor/autoload.php';

$auth = new Viloveul\Auth\Authentication($your_phrase);

$auth->setPrivateKey('private.pem');

$auth->setPublicKey('public.pem');

// create user data
$data = new Viloveul\Auth\UserData([
	'id' => 5,
	'name' => 'Viloveul',
	'email' => 'me@viloveul.com'
]);

// get token
$token = $auth->generate($data);
var_dump($token);

// check token
$auth->setToken($token);
$auth->authenticate();
var_dump($auth->getUser());
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Recently: every ~23 days

Total

8

Last Release

2623d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/609a03f1a38d80aa5cf333dd556cb748371dbcbc880f3c580ecea72ff0fb228b?d=identicon)[zafex](/maintainers/zafex)

---

Top Contributors

[![zafex](https://avatars.githubusercontent.com/u/12587685?v=4)](https://github.com/zafex "zafex (21 commits)")

---

Tags

authlibrarycomponentzafexviloveulfajrulaz

### Embed Badge

![Health badge](/badges/viloveul-auth/health.svg)

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

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k50.9M364](/packages/tymon-jwt-auth)[maicol07/flarum-ext-sso

SSO for Flarum

468.7k](/packages/maicol07-flarum-ext-sso)

PHPackages © 2026

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