ghinstallation icon indicating copy to clipboard operation
ghinstallation copied to clipboard

feat: provide context with app transport signer

Open jamestelfer opened this issue 9 months ago • 3 comments

Adds the SignWithContext interface that allows implementations that use I/O (e.g. calls to a remote KMS) to use the context of the current request, allowing it to participate in cancellation/timeout as appropriate.

Backwards compatibility is preserved by wrapping a Signer implementation in wrapping SignerWithContextAdapter. The existing Signer interface has been marked as deprecated to signal to implementors of the new implementation.

The existing RSASigner now implements both interfaces, with the Sign method marked as deprecated. This preserves backwards compatibility and avoids requiring an adaptor for the default implementation.

Fixes #117

jamestelfer avatar May 19 '24 14:05 jamestelfer