mirror of
https://github.com/byo-software/steam-openid-connect-provider.git
synced 2025-01-10 02:16: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.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using IdentityServer4.Services;
|
||||||
|
using IdentityServer.Services;
|
||||||
|
|
||||||
namespace SteamOpenIdConnectProvider
|
namespace SteamOpenIdConnectProvider
|
||||||
{
|
{
|
||||||
|
@ -27,6 +29,8 @@ namespace SteamOpenIdConnectProvider
|
||||||
.AddNewtonsoftJson()
|
.AddNewtonsoftJson()
|
||||||
.SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
|
.SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
|
||||||
|
|
||||||
|
services.AddSingleton<IConfiguration>(Configuration);
|
||||||
|
|
||||||
services.AddDbContext<AppInMemoryDbContext>(options =>
|
services.AddDbContext<AppInMemoryDbContext>(options =>
|
||||||
options.UseInMemoryDatabase("default"));
|
options.UseInMemoryDatabase("default"));
|
||||||
|
|
||||||
|
@ -52,6 +56,8 @@ namespace SteamOpenIdConnectProvider
|
||||||
.AddDeveloperSigningCredential(true)
|
.AddDeveloperSigningCredential(true)
|
||||||
.AddInMemoryIdentityResources(IdentityServerConfig.GetIdentityResources());
|
.AddInMemoryIdentityResources(IdentityServerConfig.GetIdentityResources());
|
||||||
|
|
||||||
|
services.AddScoped<IProfileService, ProfileService>();
|
||||||
|
|
||||||
services.AddAuthentication()
|
services.AddAuthentication()
|
||||||
.AddCookie(options =>
|
.AddCookie(options =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue