// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, HttpClient client)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            app.UseAuthentication();
            app.UseMvc();

            bool isSuccess = ClaimsAnalyzer.SendClaimToIdentityServer(client, "http://localhost:5000/api/claims", Services.Constants.IDENTITY);

            if (!isSuccess)
            {
                //TODO log it
            }
        }
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, HttpClient client)
        {
            if (env.IsDevelopment())
            {
                app.UseBrowserLink();
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }
            app.UseAuthentication();

            app.UseStaticFiles();
            app.UseMvcWithDefaultRoute();
            //IRouter routeCollection = null;
            //app.UseMvc(routes =>
            //{
            //    routes.MapRoute(
            //      name: "default",
            //      template: "{controller=Home}/{action=Index}/{id?}");

            //    routeCollection = routes.Build();
            //});
            //RouteData data = new RouteData();
            //data.Routers.Add(routeCollection);

            //ActionContext context = new ActionContext(new DefaultHttpContext(),data,
            //    new ActionDescriptor() { });
            ////context.RouteData.Routers = new List<IRouter> { routeCollection };
            //var url = urlHelper.GetUrlHelper(context);
            ////menuService.GenerateMenusByControllerAction();

            bool isSuccess = ClaimsAnalyzer.SendClaimToIdentityServer(client, "http://localhost:5000/api/claims", Services.Constants.Identity);

            if (!isSuccess)
            {
                //TODO log it
            }
        }