public AuthenticationHandler(
     IOptionsMonitor <AuthenticationSchemeOptions> options,
     ILoggerFactory logger,
     UrlEncoder encoder,
     ISystemClock clock,
     AltamiraDbContext context)
     : base(options, logger, encoder, clock)
 {
     _context = context;
 }
 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
 public void Configure(IApplicationBuilder app, IWebHostEnvironment env, AltamiraDbContext dbContext)
 {
     if (env.IsDevelopment())
     {
         app.UseDeveloperExceptionPage();
     }
     app.UseHttpsRedirection();
     app.UseAuthentication();
     app.UseRouting();
     app.UseAuthorization();
     //app.UseOpenApi();
     app.UseSwagger();
     app.UseSwaggerUI(c =>
     {
         c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API v1");
     });
     //app.UseSwaggerUi3();
     //var context = new AltamiraDbContext();
     Data.FakeData(dbContext);
     app.UseEndpoints(endpoints =>
     {
         endpoints.MapControllers();
     });
 }
Beispiel #3
0
 public UserRepostory(AltamiraDbContext userDbContext)
 {
     _userDbContext = userDbContext;
 }