WEBHOOKS-121 Generate JWT token in ThreadLocalContext of webhook trigger

Declined
#83 · Created  · Last updated

Declined pull request

The PR has stalled and the code has moved on

Closed by: ·2017-02-15

Description

Webhooks are dispatched on a separate thread and the JWT tokens that are generated to sign these callbacks are generated on the dispatcher thread. atlassian-jwt has a pluggable mechanism that allows plugins and the host app to inject custom JWT claims into the token when it's generated.

These JwtClaimWriters may depend on the request context that triggered the webhook, i.e. the current user.

SAL's ThreadLocalContextManager is used to capture the context when the PublishTask is created and to restore the context on the dispatcher thread when the JWT token is generated and the webhook is sent.

0 attachments

0 comments

Loading commits...