refactor(AsymCryptService): umbenannt in AsymCryptHandler
This commit is contained in:
parent
a3931414e3
commit
389d64c25d
@ -1,6 +1,6 @@
|
||||
namespace DigitalData.Core.Abstractions.Security
|
||||
{
|
||||
public interface IAsymCryptService : IRSAFactory
|
||||
public interface IAsymCryptHandler : IRSAFactory
|
||||
{
|
||||
IEnumerable<IRSADecryptor> Decryptors { get; }
|
||||
|
||||
@ -6,7 +6,7 @@ using Microsoft.Extensions.Options;
|
||||
|
||||
namespace DigitalData.Core.Security
|
||||
{
|
||||
public class AsymCryptService : RSAFactory<AsymCryptParams>, IAsymCryptService, IRSAFactory
|
||||
public class AsymCryptHandler : RSAFactory<AsymCryptParams>, IAsymCryptHandler, IRSAFactory
|
||||
{
|
||||
public IEnumerable<IRSADecryptor> Decryptors { get; }
|
||||
|
||||
@ -19,7 +19,9 @@ namespace DigitalData.Core.Security
|
||||
|
||||
public IEnumerable<IRSAEncryptor> Encryptors => _lazyEncryptors.Value;
|
||||
|
||||
public AsymCryptService(IOptions<AsymCryptParams> options, ILogger<AsymCryptService>? logger = null) : base(options)
|
||||
public IEnumerable<TokenDescription> TokenDescriptions { get; init; } = new List<TokenDescription>();
|
||||
|
||||
public AsymCryptHandler(IOptions<AsymCryptParams> options, ILogger<AsymCryptHandler>? logger = null) : base(options)
|
||||
{
|
||||
logger?.LogInformation("Core.Secrets version: {Version}, Created on: {CreationDate}.", Secrets.Version, Secrets.CreationDate.ToString("dd.MM.yyyy"));
|
||||
|
||||
@ -23,20 +23,6 @@ namespace DigitalData.Core.Security.Config
|
||||
|
||||
public string FileExtension { get; init; } = "pem";
|
||||
|
||||
/// <summary>
|
||||
/// Represents the separator used to concatenate the components of a key-related token string.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The resulting key-related token string is constructed as follows:
|
||||
/// <c>string.Join(KeyNameSeparator, Issuer, Audience, Secret_version)</c>.
|
||||
/// If <c>Secret_version</c> is not null, it will be included in the concatenation.
|
||||
/// </remarks>
|
||||
/// <example>
|
||||
/// For example, if <c>KeyNameSeparator = ":"</c>, the output might look like:
|
||||
/// <c>"Issuer:Audience:Secret_version"</c>.
|
||||
/// </example>
|
||||
public string KeyNameSeparator { get; init; } = ":";
|
||||
|
||||
/// <summary>
|
||||
///This is the subtext of the pem file name. For the file to be automatically renewed, the name must be assigned to change periodically. For example, by default MM/2 will be refreshed every 2 months.
|
||||
/// <br />
|
||||
|
||||
@ -16,7 +16,7 @@ namespace DigitalData.Core.Security
|
||||
private static IServiceCollection AddAsymCryptService(this IServiceCollection services) => services
|
||||
.AddParamsConfigureOptions<AsymCryptParams>()
|
||||
.AddAutoMapper(typeof(MappingProfile).Assembly)
|
||||
.AddSingleton<IAsymCryptService, AsymCryptService>();
|
||||
.AddSingleton<IAsymCryptHandler, AsymCryptHandler>();
|
||||
|
||||
/// <summary>
|
||||
/// Registers a custom asym crypt service with specified parameters from the given configuration section.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user