Authorization Tokens may be provided to the Temporal Java SDK by implementing a
The implementation should be used to create
io.temporal.authorization.AuthorizationGrpcMetadataProvider that may be configured on ServiceStub gRPC interceptors list.
The implementation is called for each SDK gRPC request and may supply dynamic tokens.
One of the token types that may be passed this way are JWT tokens. Temporal Server provides a default implementation of JWT authentication.
AuthorizationTokenSupplier tokenSupplier =
//your implementation of token supplier
() -> "Bearer <Base64 url-encoded value of the token for default JWT ClaimMapper>";
WorkflowServiceStubsOptions serviceStubOptions =
//other service stub options
WorkflowServiceStubs service = WorkflowServiceStubs.newServiceStubs(serviceStubOptions);
WorkflowClient client = WorkflowClient.newInstance(service);
- [How to secure a Temporal Cluster](/server/security]