public static void UseToken(this UserComConfigurator configurator, string appName, string token)
 {
     configurator.AddConfiguration(services =>
     {
         services.AddSingleton <UserComAuthenticator, TokenUserComAuthenticator>(x => new TokenUserComAuthenticator(appName, token));
     });
 }
        public static void AddUserCom(this IServiceCollection services, Action <UserComConfigurator> configuration = null)
        {
            services.AddSingleton <IUserComClient, UserComClient>();

            var cfg = new UserComConfigurator();

            configuration?.Invoke(cfg);

            cfg.ApplyConfiguration(services);
        }