Add Steam auth, platform validators & name gen
This commit is contained in:
@@ -5,6 +5,7 @@ using RecNet.Domain.Repositories;
|
||||
using RecNet.Infrastructure.Persistence;
|
||||
using RecNet.Infrastructure.Persistence.Repositories;
|
||||
using RecNet.Infrastructure.Services.Configuration;
|
||||
using RecNet.Infrastructure.Services.Steam;
|
||||
using RecNet.Infrastructure.Services.Tokens;
|
||||
|
||||
namespace RecNet.Infrastructure;
|
||||
@@ -21,6 +22,17 @@ public static class DependencyInjection
|
||||
.Bind(builder.Configuration.GetSection("Jwt"))
|
||||
.Validate(options => !string.IsNullOrWhiteSpace(options.Secret), "JWT secret is required.")
|
||||
.ValidateOnStart();
|
||||
|
||||
builder.Services
|
||||
.AddOptions<SteamOptions>()
|
||||
.Bind(builder.Configuration.GetSection("Steam"));
|
||||
|
||||
builder.Services.AddHttpClient<ISteamAuthService, SteamAuthService>(client =>
|
||||
{
|
||||
client.BaseAddress = new Uri("https://api.steampowered.com/");
|
||||
});
|
||||
|
||||
builder.Services.AddScoped<IPlatformAuthValidator, SteamAuthValidator>();
|
||||
|
||||
builder.Services.AddScoped<IProfileRepository, ProfileRepository>();
|
||||
builder.Services.AddScoped<IServerConfigRepository, ServerConfigRepository>();
|
||||
|
||||
Reference in New Issue
Block a user