Added a new .NET project `DigitalData.Auth.Claims` targeting `net8.0` with metadata for NuGet packaging. The project is configured to not generate a NuGet package on build. Introduced the `EnvelopeClaimNames` static class to define strongly-typed constants for custom JWT claim names specific to envelope receiver tokens. These include `EnvelopeId`, `EnvelopeUuid`, `ReceiverId`, and `ReceiverSignature`. Added XML documentation for all constants.
35 lines
1.3 KiB
C#
35 lines
1.3 KiB
C#
namespace DigitalData.Auth.Claims
|
|
{
|
|
/// <summary>
|
|
/// Defines the custom JWT claim names used for envelope receiver tokens.
|
|
/// These claims are domain-specific and have no equivalent in <see cref="Microsoft.IdentityModel.JsonWebTokens.JwtRegisteredClaimNames"/>.
|
|
/// </summary>
|
|
public static class EnvelopeClaimNames
|
|
{
|
|
/// <summary>
|
|
/// The database primary key of the envelope.
|
|
/// Claim name: <c>envelope_id</c>
|
|
/// </summary>
|
|
public const string EnvelopeId = "envelope_id";
|
|
|
|
/// <summary>
|
|
/// The unique identifier (UUID) of the envelope.
|
|
/// Claim name: <c>envelope_uuid</c>
|
|
/// </summary>
|
|
public const string EnvelopeUuid = "envelope_uuid";
|
|
|
|
/// <summary>
|
|
/// The database primary key of the envelope receiver.
|
|
/// Claim name: <c>receiver_id</c>
|
|
/// </summary>
|
|
public const string ReceiverId = "receiver_id";
|
|
|
|
/// <summary>
|
|
/// The cryptographic signature of the envelope receiver.
|
|
/// Together with <see cref="EnvelopeUuid"/>, it forms the unique envelope key via <c>ToEnvelopeKey()</c>.
|
|
/// Claim name: <c>receiver_sig</c>
|
|
/// </summary>
|
|
public const string ReceiverSignature = "receiver_sig";
|
|
}
|
|
}
|