public function authenticate()
{
$user = $this->repository->findOneBy(array('username' => $this->username, 'password' => sha1($this->password)));
$code = $user ? Zend_Auth_Result::SUCCESS : Zend_Auth_Result::FAILURE;
return new Zend_Auth_Result($code, $user ? $user->getId() : NULL);
}