Esempio n. 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            AuthDbContext.UpdateDatabase(app);
            app.ConfigurePermissions();

            app.UseCors("AllowAllOrigins");

            //config using jwt authentication
            app.UseJwt(this.jwtSecretToken, this.jwtAudience, this.jwtIssuer);
            //config jwt provider middleware
            app.UseMiddleware <TokenProviderMiddleware>();

            app.UseMvc();
        }