Happy flow for creating realms works
But needs more validating...
This commit is contained in:
parent
f99c97f392
commit
92b34bd0b5
25 changed files with 437 additions and 12 deletions
39
IdentityShroud.Core/DTO/JsonWebToken.cs
Normal file
39
IdentityShroud.Core/DTO/JsonWebToken.cs
Normal 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; } = [];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue