Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose API key client option #418

Merged
merged 2 commits into from
Apr 12, 2024
Merged

Expose API key client option #418

merged 2 commits into from
Apr 12, 2024

Conversation

roxblnfk
Copy link
Collaborator

@roxblnfk roxblnfk commented Apr 11, 2024

What was changed

Added method ServiceClient::withAuthKey()

Checklist

  1. Closes [Feature Request] API key client option #410
  2. How was this tested: added unit tests

Service Client with API auth key

The ClientService now can accept an API key for authentication.

$serviceClient = \Temporal\Client\GRPC\ServiceClient::createSSL(
    'temporal.my-project.com:7233',
    __DIR__ . '/my-project.key',
    __DIR__ . '/my-project.crt',
)->withAuthKey($authKey);

$workflowClient = new \Temporal\Client\WorkflowClient($serviceClient);

You may pass your own Stringable implementation as a Key to be able to change the key dynamically.

Copy link

vercel bot commented Apr 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
php ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 12, 2024 11:48am

@roxblnfk roxblnfk changed the title Add method ServiceClient::withAuthKey(); add tests Expose API key client option Apr 11, 2024
@roxblnfk roxblnfk requested review from Sushisource and wolfy-j April 11, 2024 17:41
@roxblnfk roxblnfk merged commit 0179c48 into master Apr 12, 2024
92 checks passed
@roxblnfk roxblnfk deleted the api-key-client-option branch April 12, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] API key client option
3 participants