public function login($email, $password) { $user = new User(); if ($user->getIdentity() != $email) { throw new \Vegas\Security\Authentication\Exception\InvalidCredentialException(); } $this->di->get('auth')->authenticate($user, $password); }