Reworked encryption to use less heap allocated buffers for secrets.
Also some work on plugin system.
This commit is contained in:
parent
8782ef39c6
commit
054754f553
42 changed files with 1452 additions and 242 deletions
17
IdentityShroud.GraphQL/IdentityShroud.GraphQL.csproj
Normal file
17
IdentityShroud.GraphQL/IdentityShroud.GraphQL.csproj
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HotChocolate.AspNetCore" Version="15.1.14" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\IdentityShroud.Core\IdentityShroud.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
26
IdentityShroud.GraphQL/Query.cs
Normal file
26
IdentityShroud.GraphQL/Query.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
susing IdentityShroud.Core.Contracts;
|
||||
using IdentityShroud.Core.Model;
|
||||
|
||||
namespace IdentityShroud.GraphQL;
|
||||
|
||||
public class Query
|
||||
{
|
||||
public string GetHello() => "Hello, world!";
|
||||
|
||||
public async Task<Realm?> GetRealms(
|
||||
Guid id,
|
||||
[Service] IRealmService realmService)
|
||||
{
|
||||
return await realmService.FindById(id);
|
||||
}
|
||||
}
|
||||
|
||||
public class Mutation
|
||||
{
|
||||
public async Task<Realm> RealmCreate(string name)
|
||||
{
|
||||
Realm r = new();
|
||||
|
||||
return r;
|
||||
}
|
||||
}
|
||||
31
IdentityShroud.GraphQL/RegistrationExtensions.cs
Normal file
31
IdentityShroud.GraphQL/RegistrationExtensions.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace IdentityShroud.GraphQL;
|
||||
|
||||
public static class RegistrationExtensions
|
||||
{
|
||||
extension(IServiceCollection services)
|
||||
{
|
||||
public IServiceCollection AddIdentityShroudGraphQL()
|
||||
{
|
||||
services
|
||||
.AddGraphQLServer()
|
||||
.AddMutationConventions(applyToAllMutations: true)
|
||||
.AddMutationType<Mutation>()
|
||||
.AddQueryType<Query>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
extension(IEndpointRouteBuilder app)
|
||||
{
|
||||
public IEndpointRouteBuilder MapIdentityShroudGraphQL()
|
||||
{
|
||||
app.MapGraphQL();
|
||||
return app;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue