feat(ISecurityIdentifier): Implementiert in IRSACryptographer und TokenDescription

This commit is contained in:
Developer 02 2024-12-20 14:35:10 +01:00
parent 9953bbd2ef
commit ec126be2aa
2 changed files with 8 additions and 7 deletions

View File

@ -2,14 +2,14 @@
namespace DigitalData.Core.Abstractions.Security namespace DigitalData.Core.Abstractions.Security
{ {
public interface IRSACryptographer public interface IRSACryptographer : ISecurityIdentifier
{ {
public string Pem { get; init; } public string Pem { get; init; }
public RSAEncryptionPadding Padding { get; init; } public RSAEncryptionPadding Padding { get; init; }
public string Issuer { get; init; } public new string Issuer { get; init; }
public string Audience { get; init; } public new string Audience { get; init; }
} }
} }

View File

@ -1,16 +1,17 @@
using Microsoft.IdentityModel.Tokens; using DigitalData.Core.Abstractions.Security;
using Microsoft.IdentityModel.Tokens;
namespace DigitalData.Core.Security.Config namespace DigitalData.Core.Security.Config
{ {
/// <summary> /// <summary>
/// Contains some information which used to create a security token. Designed to abstract <see cref="SecurityTokenDescriptor"/> /// Contains some information which used to create a security token. Designed to abstract <see cref="SecurityTokenDescriptor"/>
/// </summary> /// </summary>
public class TokenDescription public class TokenDescription : ISecurityIdentifier
{ {
/// <summary> /// <summary>
/// Gets or sets the value of the 'audience' claim. /// Gets or sets the value of the 'audience' claim.
/// </summary> /// </summary>
public string Audience { get; set; } public new string Audience { get; set; }
/// <summary> /// <summary>
/// Defines the compression algorithm that will be used to compress the JWT token payload. /// Defines the compression algorithm that will be used to compress the JWT token payload.
@ -30,7 +31,7 @@ namespace DigitalData.Core.Security.Config
/// <summary> /// <summary>
/// Gets or sets the issuer of this <see cref="ITokenDescription"/>. /// Gets or sets the issuer of this <see cref="ITokenDescription"/>.
/// </summary> /// </summary>
public string Issuer { get; set; } public new string Issuer { get; set; }
/// <summary> /// <summary>
/// Gets or sets the time the security token was issued. This value should be in UTC. /// Gets or sets the time the security token was issued. This value should be in UTC.