25 lines
546 B
PHP
25 lines
546 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Domain\Ports\Services;
|
|
|
|
use Domain\Contracts\AdminDetails;
|
|
|
|
/** @template T of AdminDetails */
|
|
interface AdminAuthenticationService
|
|
{
|
|
public function getMandatoryUserId(): string;
|
|
|
|
public function canWithUser(\UnitEnum | string $abilities, mixed $arguments = []): bool;
|
|
|
|
/** @return T|null */
|
|
public function getUser(): ?AdminDetails;
|
|
|
|
/** @return T */
|
|
public function getUserAsMandatory(): AdminDetails;
|
|
|
|
public function check(): bool;
|
|
|
|
public function guest(): bool;
|
|
}
|