/**
  * @param $data
  * @param Server $server
  * @return \Rocker\Object\User\UserInterface|null
  */
 public function rc4Auth($data, $server)
 {
     $conf = $server->config('application.auth');
     $parts = explode(':', RC4Cipher::decrypt($conf['secret'], base64_decode($data)));
     if (count($parts) == 2 && !is_numeric($parts[0])) {
         // don't allow to login using user id
         $user = $this->userFactory->load($parts[0]);
         if ($user !== null && $user->hasPassword($parts[1])) {
             return $user;
         }
     }
     return null;
 }