mirror of
https://github.com/byo-software/steam-openid-connect-provider.git
synced 2025-01-09 18:06:22 +00:00
Add ProfileService to Startup services
This commit is contained in:
parent
ad1c23ec43
commit
33638e1b68
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
{
|
||||
|
@ -26,6 +28,8 @@ namespace SteamOpenIdConnectProvider
|
|||
services.AddControllers()
|
||||
.AddNewtonsoftJson()
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
|
||||
|
||||
services.AddSingleton<IConfiguration>(Configuration);
|
||||
|
||||
services.AddDbContext<AppInMemoryDbContext>(options =>
|
||||
options.UseInMemoryDatabase("default"));
|
||||
|
@ -51,6 +55,8 @@ namespace SteamOpenIdConnectProvider
|
|||
.AddInMemoryPersistedGrants()
|
||||
.AddDeveloperSigningCredential(true)
|
||||
.AddInMemoryIdentityResources(IdentityServerConfig.GetIdentityResources());
|
||||
|
||||
services.AddScoped<IProfileService, ProfileService>();
|
||||
|
||||
services.AddAuthentication()
|
||||
.AddCookie(options =>
|
||||
|
|
Loading…
Reference in a new issue