Added userinfo endpoint usage and api now properly creates necessary claims to start doing database stuff

This commit is contained in:
2021-10-18 11:06:44 -04:00
parent 320d939c76
commit 9e6c7f33a5
13 changed files with 129 additions and 88 deletions

View File

@@ -68,7 +68,6 @@ namespace WebAPI
services.AddDbContext<AppDbContext>(options => options.UseNpgsql(Configuration.GetConnectionString("DefaultConnection")));
services.AddScoped<PterodactylService>();
services.AddScoped<OIDCService>();
services.AddScoped<CustomAuthorizationFilter>();
services.AddAuthentication(opt =>
{
opt.DefaultScheme = OIDCTokenAuthenticationDefaults.DefaultScheme;
@@ -77,9 +76,6 @@ namespace WebAPI
OIDCTokenAuthenticationDefaults.DefaultScheme,
opt =>
{
opt.OIDCClientId = AppSettings.OIDCClientId;
opt.OIDCClientSecret = AppSettings.OIDCClientSecret;
opt.OIDCIntrospectionEndpoint = AppSettings.OIDCIntrospectionEndpoint;
});
}