refactor(AsymCryptParams): Entfernte TokenDescriptions
This commit is contained in:
parent
ed041bf7cb
commit
a2dc59d5ef
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user