using khmer_eid_backend.Integrations.Ory;
using Microsoft.AspNetCore.Authentication;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddSingleton<KratosIntegration>();

builder.Services.AddAuthentication("Kratos")
    .AddScheme<AuthenticationSchemeOptions, KratosHandler>("Kratos", _ => { });

builder.Services.AddAuthorization();

builder.Services.AddControllers();

var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();
app.MapControllers();
app.Run();