protected function generateRememberMeCookie($username)
    {
        $key = 'ThisTokenIsNotSoSecretChangeIt';
        $class = 'WobbleCode\UserBundle\Document\User';
        $password = 'none';
        $expires = time()+2592000;

        $hash = hash('sha256', $class.$username.$expires.$password.$key);

        return $this->encodeCookie([$class, base64_encode($username), $expires, $hash]);
    }