Testing more garbage encryption
This commit is contained in:
@@ -4,7 +4,10 @@ using DCGEngine.Database.Configuration;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using SVSim.Database;
|
||||
using SVSim.Database.Models;
|
||||
using SVSim.Database.Repositories.Viewer;
|
||||
using SVSim.EmulatedEntrypoint.Middlewares;
|
||||
using SVSim.EmulatedEntrypoint.Security.SteamSessionAuthentication;
|
||||
using SVSim.EmulatedEntrypoint.Services;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint;
|
||||
|
||||
@@ -24,17 +27,41 @@ public class Program
|
||||
{
|
||||
|
||||
});
|
||||
|
||||
#region Database Services
|
||||
|
||||
builder.Services.AddDbContext<SVSimDbContext>(opt =>
|
||||
{
|
||||
opt.UseSqlite();
|
||||
opt.UseSqlite(builder.Configuration.GetConnectionString("Sqlite"));
|
||||
});
|
||||
builder.Services.AddTransient<IViewerRepository, ViewerRepository>();
|
||||
|
||||
#endregion
|
||||
|
||||
builder.Services.AddTransient<ShadowverseTranslationMiddleware>();
|
||||
builder.Services.AddTransient<SessionidMappingMiddleware>();
|
||||
builder.Services.Configure<DCGEDatabaseConfiguration>(opt =>
|
||||
{
|
||||
opt.DbSetSearchAssemblies = new List<Assembly> { Assembly.GetAssembly(typeof(SVSimDbContext)) };
|
||||
});
|
||||
builder.Services.AddSingleton<ShadowverseSessionService>();
|
||||
builder.Services.AddSingleton<SteamSessionService>();
|
||||
builder.Services.AddAuthentication()
|
||||
.AddScheme<SteamAuthenticationHandlerOptions, SteamSessionAuthenticationHandler>(
|
||||
SteamAuthenticationConstants.SchemeName,
|
||||
opt =>
|
||||
{
|
||||
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Update database
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
var dbContext = scope.ServiceProvider.GetRequiredService<SVSimDbContext>();
|
||||
dbContext.UpdateDatabase();
|
||||
}
|
||||
|
||||
app.UseHttpLogging();
|
||||
|
||||
@@ -47,8 +74,12 @@ public class Program
|
||||
|
||||
//app.UseHttpsRedirection();
|
||||
|
||||
app.UseMiddleware<SessionidMappingMiddleware>();
|
||||
|
||||
app.UseMiddleware<ShadowverseTranslationMiddleware>();
|
||||
|
||||
app.UseAuthentication();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user