Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

feat: add api key support #1436

Merged
merged 7 commits into from Jan 20, 2022
Merged

feat: add api key support #1436

merged 7 commits into from Jan 20, 2022

Conversation

arithmetic1728
Copy link
Contributor

@arithmetic1728 arithmetic1728 commented Jul 27, 2021

This PR adds API key support. Internal doc: go/gapic-api-key-support

The new logic is:
(1) if API key is provided via StubSettings.apiKey, use the API key, we are done
(2) if both GOOGLE_API_KEY and GOOGLE_APPLICATION_CREDENTIALS env variables are set, throw exception; if GOOGLE_API_KEY is provided, use the API key; otherwise, use the normal ADC flow.

This PR has been tested with java-language. arithmetic1728/java-language#1

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 27, 2021
@arithmetic1728 arithmetic1728 marked this pull request as ready for review August 6, 2021 01:15
@arithmetic1728 arithmetic1728 requested review from a team as code owners August 6, 2021 01:15
@arithmetic1728 arithmetic1728 added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 6, 2021
Copy link
Member

@TimurSadykov TimurSadykov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just minor comments/questions

Copy link
Contributor

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove "Do Not Merge" once ready.

Copy link
Contributor

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove "Do Not Merge" when ready.

@arithmetic1728
Copy link
Contributor Author

Please remove "Do Not Merge" when ready.

Will remove the "Do Not Merge" after a manual test with samples.

arithmetic1728 and others added 2 commits January 20, 2022 13:12
Co-authored-by: Chanseok Oh <chanseok@google.com>
Co-authored-by: Chanseok Oh <chanseok@google.com>
@arithmetic1728 arithmetic1728 removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 20, 2022
@arithmetic1728 arithmetic1728 merged commit 5081ec6 into main Jan 20, 2022
@arithmetic1728 arithmetic1728 deleted the apikey branch January 20, 2022 21:47
gcf-merge-on-green bot pushed a commit that referenced this pull request Jan 21, 2022
🤖 I have created a release *beep* *boop*
---


## [2.10.0](v2.9.0...v2.10.0) (2022-01-21)


### Features

* add api key support ([#1436](#1436)) ([5081ec6](5081ec6))
* introduce HttpJsonClientCall, Listeners infrastructure and ServerStreaming support in REST transport ([#1599](#1599)) ([3c97529](3c97529))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
suztomo pushed a commit to googleapis/sdk-platform-java that referenced this pull request Dec 16, 2022
🤖 I have created a release *beep* *boop*
---


## [2.10.0](googleapis/gax-java@v2.9.0...v2.10.0) (2022-01-21)


### Features

* add api key support ([#1436](googleapis/gax-java#1436)) ([e85699a](googleapis/gax-java@e85699a))
* introduce HttpJsonClientCall, Listeners infrastructure and ServerStreaming support in REST transport ([#1599](googleapis/gax-java#1599)) ([7003903](googleapis/gax-java@7003903))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants