Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 protected function getSecret(UserInterface $user)
 {
     if ($user instanceof AdvancedApiUserInterface) {
         return $user->getApiKeys();
     }
     return parent::getSecret($user);
 }
Esempio n. 2
0
 /**
  * {@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);
 }