Happy flow for creating realms works
But needs more validating...
This commit is contained in:
parent
f99c97f392
commit
92b34bd0b5
25 changed files with 437 additions and 12 deletions
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0"/>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.2" />
|
||||
<PackageReference Include="Serilog" Version="4.3.0" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
|
||||
<PackageReference Include="Serilog.Expressions" Version="5.0.0" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using IdentityShroud.Api;
|
||||
using IdentityShroud.Core;
|
||||
using IdentityShroud.Core.Contracts;
|
||||
using IdentityShroud.Core.Security;
|
||||
using Serilog;
|
||||
using Serilog.Formatting.Json;
|
||||
|
||||
|
|
@ -30,6 +32,7 @@ void ConfigureBuilder(WebApplicationBuilder builder)
|
|||
services.AddOpenApi();
|
||||
services.AddScoped<Db>();
|
||||
services.AddOptions<DbConfiguration>().Bind(configuration.GetSection("db"));
|
||||
services.AddSingleton<ISecretProvider, ConfigurationSecretProvider>();
|
||||
|
||||
builder.Host.UseSerilog((context, services, configuration) => configuration
|
||||
.Enrich.FromLogContext()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
using IdentityShroud.Core.Messages;
|
||||
using IdentityShroud.Core.Messages.Realm;
|
||||
using IdentityShroud.Core.Services;
|
||||
using Microsoft.AspNetCore.Http.HttpResults;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace IdentityShroud.Api;
|
||||
|
||||
|
|
@ -10,6 +13,9 @@ public static class RealmController
|
|||
var realm = app.MapGroup("/realms/{slug}");
|
||||
|
||||
realm.MapGet("", GetRoot);
|
||||
realm.MapPost("", (RealmCreateRequest request, [FromServices] RealmService service) =>
|
||||
service.Create(request))
|
||||
.WithName("Create Realm");
|
||||
realm.MapGet(".well-known/openid-configuration", GetOpenIdConfiguration);
|
||||
|
||||
var openidConnect = realm.MapGroup("openid-connect");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue