validateCredentials([ 'username' => $username, 'password' => $password, ])) throw new ErrException('error'); $this->logAttempt($username); // return [ 'code' => 'success' ]; } /** * @param string $type * @return bool */ public function supports(string $type): bool { return $type === 'password'; } }