refactor(RSATokenDescriptor): Lifetime-Eigenschaft hinzugefügt
This commit is contained in:
parent
3ad08e2a86
commit
a0ad8d732d
@ -11,6 +11,8 @@ namespace DigitalData.Core.Abstractions.Security
|
||||
|
||||
string? ApiRoute { get; }
|
||||
|
||||
TimeSpan Lifetime { get; init; }
|
||||
|
||||
#region SecurityTokenDescriptor Map
|
||||
/// <summary>
|
||||
/// Defines the compression algorithm that will be used to compress the JWT token payload.
|
||||
|
||||
@ -14,6 +14,8 @@ namespace DigitalData.Core.Security.RSAKey
|
||||
|
||||
public IAsymmetricTokenValidator Validator => _lazyTokenValidator.Value;
|
||||
|
||||
public required TimeSpan Lifetime { get; init; }
|
||||
|
||||
#region SecurityTokenDescriptor Map
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the 'audience' claim.
|
||||
@ -32,8 +34,9 @@ namespace DigitalData.Core.Security.RSAKey
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the 'expiration' claim. This value should be in UTC.
|
||||
/// The expiration time is the sum of DateTime.Now and LifeTime.
|
||||
/// </summary>
|
||||
public DateTime? Expires { get; set; }
|
||||
public DateTime? Expires => DateTime.Now.AddTicks(Lifetime.Ticks);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the issuer of this <see cref="SecurityTokenDescriptor"/>.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user