feat(API): Cookie-basierter Lokalisierer hinzugefügt.
This commit is contained in:
parent
f2ab2a9759
commit
ef91358c96
@ -3,6 +3,7 @@ using DigitalData.UserManager.Application;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using WorkFlow.Infrastructure;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using DigitalData.Core.API;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
var config = builder.Configuration;
|
||||
@ -11,6 +12,7 @@ var config = builder.Configuration;
|
||||
var cnn_str = config.GetConnectionString("Default") ?? throw new ("Default connection string not found.");
|
||||
builder.Services.AddDbContext<WFDBContext>(options => options.UseSqlServer(cnn_str).EnableDetailedErrors());
|
||||
builder.Services.AddWorkFlow().AddUserManager<WFDBContext>();
|
||||
builder.Services.AddCookieBasedLocalizer();
|
||||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
@ -42,6 +44,8 @@ app.UseAuthentication();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseCookieBasedLocalizer("de-DE");
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
Loading…
x
Reference in New Issue
Block a user