17 lines
502 B
C#
17 lines
502 B
C#
using DigitalData.Core.Abstractions.Security.Key;
|
|
using DigitalData.Core.Security.RSAKey.Base;
|
|
using Microsoft.IdentityModel.Tokens;
|
|
|
|
namespace DigitalData.Core.Security.RSAKey.Auth;
|
|
|
|
public class RSATokenValidator : RSAPublicKey, IAsymmetricTokenValidator
|
|
{
|
|
private readonly Lazy<RsaSecurityKey> _lazyRsaSecurityKey;
|
|
|
|
public SecurityKey SecurityKey => _lazyRsaSecurityKey.Value;
|
|
|
|
public RSATokenValidator()
|
|
{
|
|
_lazyRsaSecurityKey = new(() => new RsaSecurityKey(RSA));
|
|
}
|
|
} |