private function getSecurityToken()
    {
        if ($this->container->get('security.context')->getToken() instanceof TokenInterface) {
            return $this->container->get('security.context')->getToken();
        }

        return null;
    }