rudra/auth

Authentication module for Rudra framework

v25.6 2025-06-28 12:45 UTC

This package is auto-updated.

Last update: 2025-06-28 12:45:58 UTC


README

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();