Still working on getting client credential flow complete, most of the request works but still working on generating the JWT.
This commit is contained in:
parent
1a8c63808a
commit
8782ef39c6
80 changed files with 1331 additions and 414 deletions
34
IdentityShroud.Core/Model/RealmSigningKey.cs
Normal file
34
IdentityShroud.Core/Model/RealmSigningKey.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using IdentityShroud.Core.Security;
|
||||
using IdentityShroud.Core.Security.Keys;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace IdentityShroud.Core.Model;
|
||||
|
||||
public record RealmSigningKey
|
||||
{
|
||||
public required RealmSigningKeyId Id { get; init; }
|
||||
public required KeyType KeyType { get; init; }
|
||||
public required EncryptedDek Key { get; init; }
|
||||
public required DateTime CreatedAt { get; init; }
|
||||
public DateTime? RevokedAt { get; set; }
|
||||
/// <summary>
|
||||
/// Key with highest priority will be used. While there is not really a use case for this I know some users
|
||||
/// are more comfortable replacing keys by using priority then directly deactivating the old key.
|
||||
/// </summary>
|
||||
public int Priority { get; set; } = 10;
|
||||
|
||||
public Dictionary<string, string>? PublicKeyParameters { get; set; }
|
||||
}
|
||||
|
||||
public class RealmKeyConfiguration : IEntityTypeConfiguration<RealmSigningKey>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<RealmSigningKey> b)
|
||||
{
|
||||
b.ToTable("realm_key");
|
||||
b.HasKey(e => e.Id);
|
||||
|
||||
b.ComplexProperty(e => e.Key, e => e.IsRequired());
|
||||
b.Property(e => e.PublicKeyParameters).HasColumnType("jsonb");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue