R

Rudra-Auth

Auth

PHPunit Maintainability CodeFactor Coverage Status

Rudra-Auth | API

Authorization

Install / Установка

composer require rudra/auth

User registration / Регистрация пользователя
$user = [
    "email"    => "user@email.com",
    "password" => Auth::bcrypr("password")
];
Getting a user from the database / Получение пользователя из базы данных
$user = [
    "email"    => "user@email.com",
    "password" => "password_hash"
];
Usage / Использование
use Rudra\Auth\AuthFacade as Auth;
Authentication / Аутентификация
Auth::authentication(
    $user, 
    "password", 
    ["admin/dashboard", "login"],
    ["error" => "Wrong access data"]
);
Logout from authentication session / Выход из сеанса аутентификации
Auth::logout();

License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0) — a free, open-source license that:

  • Requires preservation of copyright and license notices,
  • Allows commercial and non-commercial use,
  • Requires that any modifications to the original files remain open under MPL-2.0,
  • Permits combining with proprietary code in larger works.

📄 Full license text: LICENSE
🌐 Official MPL-2.0 page: https://mozilla.org/MPL/2.0/


Проект распространяется под лицензией Mozilla Public License 2.0 (MPL-2.0). Это означает:

  • Вы можете свободно использовать, изменять и распространять код.
  • При изменении файлов, содержащих исходный код из этого репозитория, вы обязаны оставить их открытыми под той же лицензией.
  • Вы обязаны сохранять уведомления об авторстве и ссылку на оригинал.
  • Вы можете встраивать код в проприетарные проекты, если исходные файлы остаются под MPL.

📄 Полный текст лицензии (на английском): LICENSE
🌐 Официальная страница: https://mozilla.org/MPL/2.0/