public JwtAuthService(AzureGalleryContext context, IMapper mapper, IConfiguration configuration, IHasherService hasherService)
 {
     _context       = context;
     _iMapper       = mapper;
     _configuration = configuration;
     _hasherService = hasherService;
 }
Esempio n. 2
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, AzureGalleryContext context)
        {
            Hosting.Environment = env;

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            context.SeedData();

            app.UseCors("AngularApp");
            app.UseSwagger();
            app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "AzureGallery.API"); });

            app.UseAuthentication();
            app.UseHttpsRedirection();
            app.UseMvc();
        }