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