refactor(TokenDescriptor): ApiRoute-Eigenschaft entfernt

This commit is contained in:
Developer 02
2025-01-14 19:45:44 +01:00
parent a0ad8d732d
commit 287871ddc6
5 changed files with 0 additions and 17 deletions

View File

@@ -36,13 +36,5 @@ namespace DigitalData.Core.Security
?? throw new InvalidOperationException($"No or multiple token description found for issuer '{issuer}' and audience '{audience}'.");
return CreateToken(subject: subject, descriptor: descriptor);
}
public SecurityToken CreateToken(TPrincipal subject, string apiRoute)
{
var desc = _cryptoFactory.TokenDescriptors.SingleOrDefault(desc => desc.ApiRoute == apiRoute)
?? throw new InvalidOperationException($"No or multiple token description found for api route '{apiRoute}'.");
return CreateToken(subject: subject, descriptor: desc);
}
}
}

View File

@@ -8,8 +8,6 @@ namespace DigitalData.Core.Security.RSAKey
/// </summary>
public class RSATokenDescriptor : RSAPrivateKey, IAsymmetricTokenDescriptor
{
public string? ApiRoute { get; init; }
private readonly Lazy<RSATokenValidator> _lazyTokenValidator;
public IAsymmetricTokenValidator Validator => _lazyTokenValidator.Value;