refactor(RSATokenDescriptor): Standard-Id mit Issuer und Audience hinzugefügt.
- Issuer und Audience erforderlich gemacht.
This commit is contained in:
@@ -8,13 +8,19 @@ namespace DigitalData.Core.Security.RSAKey
|
||||
/// </summary>
|
||||
public class RSATokenDescriptor : RSAPrivateKey, IAsymmetricTokenDescriptor
|
||||
{
|
||||
internal string IdSeparator { get; set; } = "_-_";
|
||||
|
||||
private string? _id;
|
||||
|
||||
public override string Id { get => _id ?? $"{Issuer}{IdSeparator}{Audience}"; internal set => _id = value; }
|
||||
|
||||
public string? ApiRoute { get; init; }
|
||||
|
||||
#region SecurityTokenDescriptor Map
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the 'audience' claim.
|
||||
/// </summary>
|
||||
public string Audience { get; set; }
|
||||
public required string Audience { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Defines the compression algorithm that will be used to compress the JWT token payload.
|
||||
@@ -34,7 +40,7 @@ namespace DigitalData.Core.Security.RSAKey
|
||||
/// <summary>
|
||||
/// Gets or sets the issuer of this <see cref="SecurityTokenDescriptor"/>.
|
||||
/// </summary>
|
||||
public string Issuer { get; set; }
|
||||
public required string Issuer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the time the security token was issued. This value should be in UTC.
|
||||
|
||||
Reference in New Issue
Block a user