refactor(AsymCryptParams): Entfernte TokenDescriptions

This commit is contained in:
Developer 02 2025-01-06 13:11:05 +01:00
parent ed041bf7cb
commit a2dc59d5ef

View File

@ -42,8 +42,6 @@ namespace DigitalData.Core.Security.Config
public IEnumerable<RSADecryptor> Decryptors { get; init; } = new List<RSADecryptor>();
public IEnumerable<TokenDescription> TokenDescriptions { get; init; } = new List<TokenDescription>();
public RSADecryptor? Vault { get; init; }
public AsymCryptParams()
@ -84,19 +82,6 @@ namespace DigitalData.Core.Security.Config
}
}
};
// set signing credentials of token descriptions
AfterCreate += () =>
{
foreach(var tDesc in TokenDescriptions)
{
if (!Decryptors.TryGet(issuer: tDesc.Issuer, tDesc.Audience, out var decryptor))
throw new InvalidOperationException(
$"Decryptor for Issuer '{tDesc.Issuer}' and Audience '{tDesc.Audience}' could not be found or is null.");
tDesc.SigningCredentials = decryptor.CreateSigningCredentials(algorithm: tDesc.SigningAlgorithm, digest: tDesc.SigningDigest);
}
};
}
}
}