/** * {@inheritdoc} */ protected function getSecret(UserInterface $user) { if ($user instanceof AdvancedApiUserInterface) { return $user->getApiKeys(); } return parent::getSecret($user); }
/** * {@inheritdoc} */ protected function getSecret(UserInterface $user) { if ($user instanceof AdvancedApiUserInterface) { $apiKeys = $user->getApiKeys(); if (0 === count($apiKeys)) { return uniqid('undefined'); } return $apiKeys; } return parent::getSecret($user); }