Add ProfileService to Startup services

This commit is contained in:
SunriseM 2020-10-03 12:38:01 -04:00
parent ad1c23ec43
commit 33638e1b68

View file

@ -8,6 +8,8 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using IdentityServer4.Services;
using IdentityServer.Services;
namespace SteamOpenIdConnectProvider
{
@ -27,6 +29,8 @@ namespace SteamOpenIdConnectProvider
.AddNewtonsoftJson()
.SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
services.AddSingleton<IConfiguration>(Configuration);
services.AddDbContext<AppInMemoryDbContext>(options =>
options.UseInMemoryDatabase("default"));
@ -52,6 +56,8 @@ namespace SteamOpenIdConnectProvider
.AddDeveloperSigningCredential(true)
.AddInMemoryIdentityResources(IdentityServerConfig.GetIdentityResources());
services.AddScoped<IProfileService, ProfileService>();
services.AddAuthentication()
.AddCookie(options =>
{