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