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
24
IdentityShroud.Core/Model/RealmSigningKeyId.cs
Normal file
24
IdentityShroud.Core/Model/RealmSigningKeyId.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace IdentityShroud.Core.Model;
|
||||
|
||||
[JsonConverter(typeof(RealmSigningKeyIdJsonConverter))]
|
||||
public readonly record struct RealmSigningKeyId(Guid Id)
|
||||
{
|
||||
public override string ToString() => Id.ToString("N");
|
||||
|
||||
public static RealmSigningKeyId NewId()
|
||||
{
|
||||
return new(Guid.NewGuid());
|
||||
}
|
||||
}
|
||||
|
||||
public class RealmSigningKeyIdJsonConverter : JsonConverter<RealmSigningKeyId>
|
||||
{
|
||||
public override RealmSigningKeyId Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
=> new (reader.GetGuid());
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, RealmSigningKeyId value, JsonSerializerOptions options)
|
||||
=> writer.WriteStringValue(value.ToString());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue