/**
  * Retrieves the data of the given auth code from the database.
  * Before executing the query to get the auth code data expired auth codes are deleted from the database if this is not disabled in the settings.
  * If a valid auth code is found the code is refreshed to prevent expiration whil the user accesses a protected page.
  *
  * @param string $authCode the submitted auth code
  * @return \Tx\Authcode\Domain\Model\AuthCode|NULL NULL if no data was found, otherwise an associative array of the auth code data
  */
 public function getAuthCodeDataFromDB($authCode)
 {
     $this->formhandlerUtils->debugMessage('Trying to read auth code data from database');
     $authCode = $this->authCodeRepository->findOneByAuthCode($authCode);
     if (isset($authCode)) {
         $this->authCodeRepository->refreshAuthCode($authCode);
     }
     return $authCode;
 }