How use authorization mechanism in worker

Hi all,
I successfully implemented the authorization mechanism to authorize tctl cli with temporal server. I used authorizer/claimMapper in server and “temporal-tctl-authorization-plugin” plugin in tctl (the tctl pass a JWT token that contains the identity).
I’m trying to understand if it is possible to use the same logic for “workers”. At the moment the workers are blocked because they are not authorized (how can I pass the JWT from worker and identify them).

Great Thanks
Regards
Marco

Absolutely. JWT-based authentication is usually via the Authorization: Bearer <mytoken> header which can be sent to the server via a client.Options.HeadersProvider. I opened Add sample for auth token · Issue #160 · temporalio/samples-go · GitHub a couple of days ago to address this gap in the samples. The tctl CLI uses this same approach with your plugin since the tctl CLI just uses the SDK client.