Currently, the IJwtAlgorithm interface does not support asynchronous signing, but the AWS KMS Client has implemented the Sign method in an async manner. As a result, when implementing a custom signing algorithm that uses the KMS Client as the underlying method for actual signing, the current solution involves blocking the calling thread using the GetResult() method. This approach may lead to resource starvation and deadlock if the workload is high.
To enable non-blocking signing using AWS KMS Client, we need to add support for asynchronous signing in the IJwtAlgorithm interface.
any thoughts or comments, please?