/// <summary>
        /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        /// </summary>
        /// <param name="app"></param>
        /// <param name="env"></param>
        /// <param name="loggerFactory"></param>
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            // // global policy - assign here or on each controller
            // app.UseCors("CorsPolicy");

            ConfigureToken(app);

            app.UseMvc();

            //Remove invalidated tokens from Db
            DbCleaner.RemoveInvalidatedTokens(app.ApplicationServices, new JWTAuthTokenServices());

            //Seed db with initial data
            DbSeeder.SeedDbWithSampleUsers(app.ApplicationServices);
        }