rudra/auth

Rudra framework

v2.0.0 2018-05-29 14:28 UTC

This package is auto-updated.

Last update: 2024-10-25 15:53:02 UTC


README

PHPunit Scrutinizer Code Quality Code Climate CodeFactor GitHub

Rudra-Auth | API

Authorization

Install / Установка

composer require rudra/auth

Setting up roles / Настройка ролей
[
    'admin'     => 0,
    'editor'    => 1,
    'moderator' => 2,
    'user'      => 3
]

Usage / Использование

use Rudra\Auth\AuthFacade as Auth;

$user = [
    "email"    => "user@email.com",
    "password" => "password"
];

Auth::authentication($user[0], $user[1], "admin/dashboard", "Укажите верные данные");
Auth::exitAuthenticationSession();
Auth::restoreSessionIfSetRememberMe("login");