PHPackages                             pragma-framework/auth-session - 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. pragma-framework/auth-session

ActiveLibrary[Framework](/categories/framework)

pragma-framework/auth-session
=============================

The Pragma Module for handling users sessions in Pragma Framework

v1.0.2(8y ago)19701MITPHPPHP &gt;=5.5.0

Since Nov 7Pushed 8y ago2 watchersCompare

[ Source](https://github.com/pragma-framework/auth-session)[ Packagist](https://packagist.org/packages/pragma-framework/auth-session)[ RSS](/packages/pragma-framework-auth-session/feed)WikiDiscussions master Synced 2mo ago

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

Pragma AuthSession
==================

[](#pragma-authsession)

Prerequisites
-------------

[](#prerequisites)

This package uses PHP `password_hash` and `password_verify` functions, requiring minimum `PHP >= 5.3.7`.

Compatibility with PHP versions from `5.3.7` to `5.5` is achieved by using `ircmaxell/password-compat` [composer package](https://packagist.org/packages/ircmaxell/password-compat).

Configuration
-------------

[](#configuration)

### config.php

[](#configphp)

In the `config.php` file, there is a `AUTH_USER_MODEL` constant, needed for a proper functioning of this package.

This constant defines the model name representing users of your application.

**Example :**

```
define('AUTH_USER_MODEL', 'App\\Models\\User');

```

You can also define the user's password hash generation cost. The system default cost is 10. You can overload this by setting `AUTH_CRYPTO_COST` to the desired value:

```
define('AUTH_CRYPTO_COST', 13);

```

### session\_start()

[](#session_start)

Do not forget to start session in `public/index.php`of your application if you want to use this package.

Available functions
-------------------

[](#available-functions)

### AuthSession::hashgen($pwd)

[](#authsessionhashgenpwd)

This method returns the generated hash of the clear text `$pwd` parameter.

### AuthSession::check\_password($pwd, $hash)

[](#authsessioncheck_passwordpwd-hash)

This method compares a clear password (`$pwd`) and the user's `$hash`.

Return value will be `true` if password matches the hash, `false` otherwise.

### AuthSession::register\_session($u)

[](#authsessionregister_sessionu)

This method stores identified user informations in session.

### AuthSession::signed\_in()

[](#authsessionsigned_in)

This method returns `true` if the user is identified, `false` otherwise.

### AuthSession::get\_signed\_user()

[](#authsessionget_signed_user)

This method return the object instance corresponding to the logged in user.

### AuthSession::destroy\_session()

[](#authsessiondestroy_session)

This method remove user informations from session, thus logout the user.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 58.3% 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 ~77 days

Total

4

Last Release

3248d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/96c7742e8371ca21c3518a55945f737d11d72431c4490bc92958018fa5cbe023?d=identicon)[cyrilrouyer](/maintainers/cyrilrouyer)

---

Top Contributors

[![cyrilrouyer](https://avatars.githubusercontent.com/u/23081586?v=4)](https://github.com/cyrilrouyer "cyrilrouyer (7 commits)")[![pips-](https://avatars.githubusercontent.com/u/1785712?v=4)](https://github.com/pips- "pips- (5 commits)")

---

Tags

frameworkauthsessionpragma

### Embed Badge

![Health badge](/badges/pragma-framework-auth-session/health.svg)

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

###  Alternatives

[digitalstars/simplevk

Powerful PHP library/framework for VK API bots, supporting LongPoll &amp; Callback &amp; OAuth

883.9k3](/packages/digitalstars-simplevk)

PHPackages © 2026

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