v7‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT User.php000064400000000465152101627500006177 0ustar00user = $user; } public function authenticate() { return new Am_Auth_Result(Am_Auth_Result::SUCCESS, null, $this->user); } }Interface.php000064400000000123152101627500007150 0ustar00login = $login; $this->pass = $pass; $this->table = $table; $this->useSavedPass = $useSavedPass; } public function authenticate() { if (!strlen($this->login) || !strlen($this->pass)) { return new Am_Auth_Result(Am_Auth_Result::INVALID_INPUT); } $u = $this->table->getAuthenticatedRow($this->login, $this->pass, $code); if (!$u && $this->useSavedPass && ($user = $this->table->getByLoginOrEmail($this->login))) { foreach ($user->getSavedPass() as $savedPass) { try { if ($savedPass->checkPassword($this->pass)) { $u = $user; $code = Am_Auth_Result::SUCCESS; break; } } catch(Am_Exception_InternalError $e) { ; // Ignore exception. It could be generated if third-paty plugin was disabled. } } } return new Am_Auth_Result($code, null, $u); } }Cookie.php000064400000000721152101627500006465 0ustar00login = $login; $this->pass = $pass; $this->table = $table; } public function authenticate() { $u = $this->table->getAuthenticatedCookieRow($this->login, $this->pass, $code); return new Am_Auth_Result($code, null, $u); } }Plugin.php000064400000000772152101627500006520 0ustar00hook = $hook; } public function authenticate() { $e = new Am_Event_AuthCheckLoggedIn(); $this->hook->call($e); if ($e->isSuccess()) { return new Am_Auth_Result(Am_Auth_Result::SUCCESS, null, $e->getUser()); } return new Am_Auth_Result(Am_Auth_Result::INVALID_INPUT); } }AdminPassword.php000064400000001147152101627500010032 0ustar00login = $login; $this->pass = $pass; $this->table = $table; } public function authenticate() { if (!strlen($this->login) || !strlen($this->pass)) { return new Am_Auth_Result(Am_Auth_Result::INVALID_INPUT); } $u = $this->table->getAuthenticatedRow($this->login, $this->pass, $code); return new Am_Auth_Result($code, null, $u); } }