Implemented security functionality

Added data protection feature
Migrated changes
This commit is contained in:
2026-08-20 15:15:54 +02:00
parent 5ab977e335
commit 32a80eb84d
27 changed files with 735 additions and 37 deletions
+1 -27
View File
@@ -2,13 +2,10 @@ using Scalar.AspNetCore;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
builder.Services.AddOpenApi();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.MapScalarApiReference(options =>
@@ -16,33 +13,10 @@ if (app.Environment.IsDevelopment())
options.WithTitle("Post-fund Management API")
.WithTheme(ScalarTheme.BluePlanet);
});
app.MapOpenApi();
}
app.UseHttpsRedirection();
var summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
app.MapGet("/weatherforecast", () =>
{
var forecast = Enumerable.Range(1, 5).Select(index =>
new WeatherForecast
(
DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
Random.Shared.Next(-20, 55),
summaries[Random.Shared.Next(summaries.Length)]
))
.ToArray();
return forecast;
})
.WithName("GetWeatherForecast");
app.Run();
record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
{
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}