WIP making ClientCreate endpoint
This commit is contained in:
parent
138f335af0
commit
eb872a4f44
28 changed files with 365 additions and 121 deletions
25
IdentityShroud.Core/Contracts/IClientService.cs
Normal file
25
IdentityShroud.Core/Contracts/IClientService.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using IdentityShroud.Core.Model;
|
||||
|
||||
namespace IdentityShroud.Core.Contracts;
|
||||
|
||||
//public record CreateClientRequest(Guid RealmId, string ClientId, string? Description);
|
||||
|
||||
public class ClientCreateRequest
|
||||
{
|
||||
public string ClientId { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public string? SignatureAlgorithm { get; set; }
|
||||
public bool? AllowClientCredentialsFlow { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public interface IClientService
|
||||
{
|
||||
Task<Result<Client>> Create(
|
||||
Guid realmId,
|
||||
ClientCreateRequest request,
|
||||
CancellationToken ct = default);
|
||||
|
||||
Task<Client?> GetByClientId(string clientId, CancellationToken ct = default);
|
||||
}
|
||||
6
IdentityShroud.Core/Contracts/IClock.cs
Normal file
6
IdentityShroud.Core/Contracts/IClock.cs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
namespace IdentityShroud.Core.Contracts;
|
||||
|
||||
public interface IClock
|
||||
{
|
||||
DateTime UtcNow();
|
||||
}
|
||||
8
IdentityShroud.Core/Contracts/IKeyProvisioningService.cs
Normal file
8
IdentityShroud.Core/Contracts/IKeyProvisioningService.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
using IdentityShroud.Core.Model;
|
||||
|
||||
namespace IdentityShroud.Core.Contracts;
|
||||
|
||||
public interface IKeyProvisioningService
|
||||
{
|
||||
RealmKey CreateRsaKey(int keySize = 2048);
|
||||
}
|
||||
13
IdentityShroud.Core/Contracts/IRealmService.cs
Normal file
13
IdentityShroud.Core/Contracts/IRealmService.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using IdentityShroud.Core.Messages.Realm;
|
||||
using IdentityShroud.Core.Model;
|
||||
using IdentityShroud.Core.Services;
|
||||
|
||||
namespace IdentityShroud.Core.Contracts;
|
||||
|
||||
public interface IRealmService
|
||||
{
|
||||
Task<Realm?> FindBySlug(string slug, CancellationToken ct = default);
|
||||
|
||||
Task<Result<RealmCreateResponse>> Create(RealmCreateRequest request, CancellationToken ct = default);
|
||||
Task LoadActiveKeys(Realm realm);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue