|
|
|
@ -19,21 +19,21 @@ class Factory
|
|
|
|
public function __construct(
|
|
|
|
public function __construct(
|
|
|
|
private PersistenceInterface $db,
|
|
|
|
private PersistenceInterface $db,
|
|
|
|
private RequestInterface $request,
|
|
|
|
private RequestInterface $request,
|
|
|
|
private null|SessionInterface $session,
|
|
|
|
private ?SessionInterface $session,
|
|
|
|
private null|\PSR\Clock\ClockInterface $csrfClock,
|
|
|
|
private ?\PSR\Clock\ClockInterface $csrfClock,
|
|
|
|
private null|AntiCSRFInterface $csrf,
|
|
|
|
private ?AntiCSRFInterface $csrf,
|
|
|
|
private null|\PSR\Clock\ClockInterface $totpClock,
|
|
|
|
private ?\PSR\Clock\ClockInterface $totpClock,
|
|
|
|
private null|HashInterface $hash,
|
|
|
|
private ?HashInterface $hash,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$this->session ? : $this->session = new Session\Base();
|
|
|
|
!is_null($this->session)? : $this->session = new Session\Base();
|
|
|
|
$this->csrf_clock ? : $this->csrfClock = new Clock\Request();
|
|
|
|
!is_null($this->csrf_clock)? : $this->csrfClock = new Clock\Request();
|
|
|
|
$this->csrf ? : $this->csrf = new AntiCSRF\Base(
|
|
|
|
!is_null($this->csrf)? : $this->csrf = new AntiCSRF\Base(
|
|
|
|
$this->session,
|
|
|
|
$this->session,
|
|
|
|
$this->csrf_clock
|
|
|
|
$this->csrf_clock
|
|
|
|
);
|
|
|
|
);
|
|
|
|
$this->totp_clock ? : $this->totpClock = new Clock\Base();
|
|
|
|
!is_null($this->totp_clock)? : $this->totpClock = new Clock\Base();
|
|
|
|
$this->$hash ? : $this->hash = new Hash\HMAC_SHA1();
|
|
|
|
!is_null($this->$hash)? : $this->hash = new Hash\HMAC_SHA1();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function userManagement(mixed $userIndex): UserManagement
|
|
|
|
public function userManagement(mixed $userIndex): UserManagement
|
|
|
|
|