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

ActiveLibrary[Framework](/categories/framework)

mvccore/ext-auth
================

MvcCore - Extension - Auth - authentication module with automatic authentication module type detection by loaded classes.

v5.3.1(8mo ago)13.3k1BSD-3-ClausePHPPHP &gt;=5.4.0

Since Jan 15Pushed 8mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (2)Versions (12)Used By (0)

MvcCore - Extension - Authentication
====================================

[](#mvccore---extension---authentication)

[![Latest Stable Version](https://camo.githubusercontent.com/f4548b31034f2871a699ddf4e0c7bc5d6262647d641868f7ea7f6a3f3297db5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f537461626c652d76352e332e312d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://github.com/mvccore/ext-auth/releases)[![License](https://camo.githubusercontent.com/53baed538c1c87a033a212f6f4acce684d36137f8622307643ab25e08118452e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d425344253230332d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://mvccore.github.io/docs/mvccore/5.0.0/LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)

Authentication module with automatic authentication module type detection by loaded classes.

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

[](#installation)

```
composer require mvccore/ext-auth
```

Usage
-----

[](#usage)

Add this to `Bootstrap.php` or to very application beginning, before application routing.

```
\MvcCore\Ext\Auth::GetInstance()
	->SetPasswordHashSalt('s9E56/QH6!a69sJML9aS$6s+')
	->SetUserClass('\\MvcCore\\Ext\\Auths\\Users\\SystemConfig');
```

For system config users, you need to specify users in `system.ini` like this:

```
[users]
0.userName		= admin
0.fullName		= Administrator
0.passwordHash	= $2y$10$czlFNTYvUUg2IWE2OXNKTO8PB5xPGXz9i8IH7Fa7M0YsPlSLriJZu
; admin password is `demo`
```

To get sign in form into view in your application controller:

```
...
	public function IndexAction () {
		if ($this->user !== NULL)
			self::Redirect($this->Url('administration_index_page'));
		$this->view->SignInForm = \MvcCore\Ext\Auth::GetInstance()
			->GetSignInForm()
			->SetValues(array(// set signed in url to administration index page by default:
				'successUrl' => $this->Url('administration_index_page'),
			));
	}
...
```

To get sign out form into view in your application controller:

```
...
	public function PreDispatch () {
		parent::PreDispatch();
		if ($this->viewEnabled && $this->user) {
			$this->view->SignOutForm =\MvcCore\Ext\Auth::GetInstance()
				->GetSignOutForm()
				->SetValues(array(
					'successUrl' => $this->Url('login_page')
				));
		}
	}
...
```

For any forms CSRF errors - you can call in base controller `Init()` action:

```
...
	public function Init() {
		parent::Init();
		// when any CSRF token is outdated or not the same - sign out user by default
		$this->application->AddSecurityErrorHandler(function (\MvcCore\IRequest $req, \MvcCore\IResponse $res, ?\MvcCore\Ext\Form $form = NULL) {
			\MvcCore\Ext\Auth\User::LogOut();
			self::Redirect($this->Url(
				'Index:Index',
				array('absolute' => TRUE, 'sourceUrl'	=> rawurlencode($form->ErrorUrl))
			));
		});
	}
...
```

To translate your signin and signout form visible elements, use:

```
\MvcCore\Ext\Auth::GetInstance()->SetTranslator(function ($key, $lang = NULL) {
	// your custom translator model/service:
	return \App\Models\Translator::GetInstance()->Translate($key, $lang);
});
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance60

Regular maintenance activity

Popularity19

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

Recently: every ~702 days

Total

11

Last Release

259d ago

Major Versions

v3.2.0 → v4.0.02017-01-27

v4.3.1 → v5.0.02021-01-18

PHP version history (2 changes)v3.0.0PHP &gt;=5.3.0

v5.0.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a68d9cd696ed584a9ee742fa089d0650f4f7a95754bf5d9ee301e6c9013df3fd?d=identicon)[tomFlidr](/maintainers/tomFlidr)

---

Top Contributors

[![tomFlidr](https://avatars.githubusercontent.com/u/1833722?v=4)](https://github.com/tomFlidr "tomFlidr (85 commits)")

---

Tags

pluginframeworkauthAuthenticationuserauthorizationmvcextensionloginplug-insigninauthenticateextlogoutlog-inmvccoresign-insign-outsignoutlog out

### Embed Badge

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

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

PHPackages © 2026

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