public static function createSessionManager(ContainerInterface $container): SessionManager
    {
        $manager = new SessionManager($container->get('config'));

        if ($container->has(CacheManagerContract::class)) {
            $manager->setCacheManager($container->get(CacheManagerContract::class));
        }

        if ($container->has(JarContract::class)) {
            $manager->setCookieJar($container->get(JarContract::class));
        }

        return $manager;
    }