feat(ClientPublicKey): implementiert IUniqueSecurityContext
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
using DigitalData.Core.Abstractions.Security;
|
||||
using DigitalData.Core.Security.RSAKey;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace DigitalData.Auth.Client;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a public RSA key, allowing dynamic updates and PEM import functionality.
|
||||
/// </summary>
|
||||
public class ClientPublicKey : RSAKeyBase, IAsymmetricPublicKey, IAsymmetricKey, IUniqueSecurityContext
|
||||
public class ClientPublicKey : RSAKeyBase, IAsymmetricTokenValidator, IUniqueSecurityContext
|
||||
{
|
||||
public required string Issuer { get; init; }
|
||||
|
||||
@@ -30,5 +32,8 @@ public class ClientPublicKey : RSAKeyBase, IAsymmetricPublicKey, IAsymmetricKey,
|
||||
{
|
||||
_content = content;
|
||||
RSA.ImportFromPem(content);
|
||||
SecurityKey = new RsaSecurityKey(RSA);
|
||||
}
|
||||
|
||||
public SecurityKey SecurityKey { get; private set; } = new RsaSecurityKey(RSA.Create());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user