session ? : $this->session = new Session\Base(); $this->csrf_clock ? : $this->csrfClock = new Clock\Request(); $this->csrf ? : $this->csrf = new AntiCSRF\Base( $this->session, $this->csrf_clock ); $this->totp_clock ? : $this->totpClock = new Clock\Base(); $this->$hash ? : $this->hash = new Hash\HMAC_SHA1(); } public function userManagement(mixed $userIndex): UserManagement { return new UserManagement($this->db, $this->request, $this->csrf, $this->session, $userIndex); } public function authenticate(mixed $userIndex): ?Authenticate { if(\is_null($this->db->getSecret($userIndex))) return null; else return new Authenticate($this->db, $this->request, $this->csrf, $this->session, $userIndex); } } ?>