/
jagepard
/
Rudra-Auth
Обзор
Документация
Войти
/
jagepard
/
Rudra-Auth
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/AuthInterface.php
21 строка
863 B
Jagepard
fix(auth): use random IV for encryption and validate roles in config
05 июн 2026, 21:33
05 июн 2026, 21:33
8113b0c
Код
Авторство
О чём код?
<?php /** * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. * * @author Korotkov Danila (Jagepard) <jagepard@yandex.ru> * @license https://mozilla.org/MPL/2.0/ MPL-2.0 */ namespace Rudra\Auth; interface AuthInterface { public function authentication(array $user, string $password, array $redirect = ['admin', 'login'], array $notice = ["error" => "Wrong access data"]): void; public function logout(string $redirect = ""): void; public function authorization(?string $token = null, ?string $redirect = null): bool; public function roleBasedAccess(string $role, string $privilege, ?string $redirect = null): bool; public function bcrypt(string $password, int $cost = 10): string; }