/**
  * Creates a tiny url if enabled in configuration and extension
  * is available
  */
 protected function generateTinyUrl()
 {
     if (!($this->settings['generateTinyUrl'] && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('tinyurls'))) {
         return;
     }
     if (!isset($this->tinyUrlApi)) {
         $this->tinyUrlApi = GeneralUtility::makeInstance(\Tx\Tinyurls\TinyUrl\Api::class);
     }
     $this->tinyUrlApi->setDeleteOnUse(1);
     $this->tinyUrlApi->setUrlKey($this->gp['generated_authCode']);
     $this->tinyUrlApi->setValidUntil($this->authCodeRepository->getValidUntil()->getTimestamp());
     $url = $this->gp['authCodeUrl'];
     $this->gp['authCodeUrl'] = $this->tinyUrlApi->getTinyUrl($url);
 }
 /**
  * Returns the timestamp when the currently generated auth codes will expire.
  *
  * @return int validity timestamp
  * @deprecated Since 0.7.0, will be removed in version 1.0.0, use AuthCodeRepository instead.
  * @see \Tx\Authcode\Domain\Repository\AuthCodeRepository::getValidUntil()
  */
 public function getAuthCodeValidityTimestamp()
 {
     return $this->authCodeRepository->getValidUntil()->getTimestamp();
 }