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.
Проект распространяется под лицензией Mozilla Public License 2.0 (MPL-2.0). Это означает:
- Вы можете свободно использовать, изменять и распространять код.
- При изменении файлов, содержащих исходный код из этого репозитория, вы обязаны оставить их открытыми под той же лицензией.
- Вы обязаны сохранять уведомления об авторстве и ссылку на оригинал.
- Вы можете встраивать код в проприетарные проекты, если исходные файлы остаются под MPL.