mvccore/ext-auth

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


Keywords
framework, authorization, Authentication, plugin, user, mvc, extension, login, auth, logout, signin, signout, authenticate, plug-in, ext, mvccore, sign in, sign out, log in, log out
License
BSD-3-Clause

Documentation

MvcCore Extension - Basic Authentication

Latest Stable Version License PHP Version

Simple authentication service, only to signin/signout an user. Service use credentials defined in system config.ini by default. Service is very easy to extend and configure for new user model class to authenticate the user by any database credentials or anything else and the same is possible for sign in/out controller or form class to use any registration implementation you need.

Installation

composer require mvccore/ext-auth

Usage

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

\MvcCore\Ext\Auth::GetInstance()->Init();

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

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