Miscelanious trials

This commit is contained in:
eelke 2026-02-06 19:58:01 +01:00
commit f99c97f392
33 changed files with 881 additions and 0 deletions

View file

@ -0,0 +1,39 @@
using System.Text.Json.Serialization;
namespace IdentityShroud.Core.Messages;
public class JsonWebTokenHeader
{
[JsonPropertyName("alg")]
public string Algorithm { get; set; } = "HS256";
[JsonPropertyName("typ")]
public string Type { get; set; } = "JWT";
[JsonPropertyName("kid")]
public string KeyId { get; set; }
}
public class JsonWebTokenPayload
{
[JsonPropertyName("iss")]
public string Issuer { get; set; }
[JsonPropertyName("aud")]
public string[] Audience { get; set; }
[JsonPropertyName("sub")]
public string Subject { get; set; }
[JsonPropertyName("exp")]
public long Expires { get; set; }
[JsonPropertyName("iat")]
public long IssuedAt { get; set; }
[JsonPropertyName("nbf")]
public long NotBefore { get; set; }
[JsonPropertyName("jti")]
public Guid JwtId { get; set; }
}
public class JsonWebToken
{
public JsonWebTokenHeader Header { get; set; } = new();
public JsonWebTokenPayload Payload { get; set; } = new();
public byte[] Signature { get; set; } = [];
}