/**
  * Clears the authentification in the storage. When there is a user switch, only the authentication of the switched user should be cleared.
  * If there is no user switch, all authentication data should be cleared
  * @return null
  */
 protected function clearAuthentification()
 {
     $clear = 'clear';
     $timeout = time();
     if ($this->getSwitchedUsername()) {
         $this->cookie->set(self::COOKIE_SWITCHED_USERNAME, $clear, $timeout);
     } else {
         $this->cookie->set(self::COOKIE_USERNAME, $clear, $timeout);
         $this->cookie->set(self::COOKIE_AUTHENTICATION_STRING, $clear, $timeout);
     }
 }
 /**
  * Constructs a new authenticator
  * @return null
  */
 public function __construct()
 {
     parent::__construct();
     $this->cookie = Cookie::getInstance();
 }