feat(IAsymmetricTokenDescriptor): Methode Validator.get mit Lazy Loading hinzugefügt.
This commit is contained in:
@@ -10,6 +10,10 @@ namespace DigitalData.Core.Security.RSAKey
|
||||
{
|
||||
public string? ApiRoute { get; init; }
|
||||
|
||||
private readonly Lazy<RSATokenValidator> _lazyTokenValidator;
|
||||
|
||||
public IAsymmetricTokenValidator Validator => _lazyTokenValidator.Value;
|
||||
|
||||
#region SecurityTokenDescriptor Map
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the 'audience' claim.
|
||||
@@ -102,6 +106,8 @@ namespace DigitalData.Core.Security.RSAKey
|
||||
public RSATokenDescriptor()
|
||||
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
{
|
||||
_lazyTokenValidator = new(CreatePublicKey<RSATokenValidator>);
|
||||
|
||||
_lazyRsaSecurityKey = new(() => new RsaSecurityKey(RSA));
|
||||
|
||||
_lazySigningCredentials = new(() => SigningDigest is null
|
||||
|
||||
Reference in New Issue
Block a user