public function validateCredentials(UserInterface $user, array $credentials) { if ($user->getUserName($credentials['username']) && $user->getPassword($credentials['password'])) { return true; } return false; }
/** * {@inheritdoc} */ public function validateCredentials(UserInterface $user, array $credentials) { return $this->encoder->verify($user->getPassword(), $credentials['password']); }
/** * This is called when an authentication is successful. * * @param Request $request * @param UserInterface $user */ public function set(Request $request, UserInterface $user) { $this->remove(); if (!$this->isRememberMeRequested($request)) { return; } $expires = self::COOKIE_LIFETIME + time(); $value = $this->generateCookieValue($user->getUsername(), $expires, $user->getPassword()); $this->cookie->set($this->name, $value, $expires); }