You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current sign interface has the single Sign method:
Sign(claimsjwt.Claims) (string, error)
When implementing an AWS KMS signer, the lack of the context means the remote operation doesn't participate in the main context, so it's unaware of request timeouts or server shutdown.
Another valuable use case for the context is when using telemetry. The current trace is generally carried on the request context, so including the context allows actions taken during signing to be included in the wider request trace.
The current sign interface has the single
Sign
method:When implementing an AWS KMS signer, the lack of the context means the remote operation doesn't participate in the main context, so it's unaware of request timeouts or server shutdown.
What about adding:
An existing
Signer
implementation can be supported through a simple wrapper function:Then a configuration item for
WithContextSigner
or similar. Thoughts?I am able to raise a PR for this, or some more acceptable variation.
The text was updated successfully, but these errors were encountered: