Skip to content

Conversation

@arithmetic1728
Copy link
Contributor

@arithmetic1728 arithmetic1728 commented Aug 5, 2021

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

(1) created a new credential class for API key. The credential adds API key to x-goog-api-key header.

(2) The new ADC logic is:

  • if both GOOGLE_API_KEY and GOOGLE_APPLICATION_CREDENTIALS are set, raise an exception
  • if GOOGLE_API_KEY is set then return an API key credential; otherwise use the existing ADC flow

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 5, 2021
@arithmetic1728 arithmetic1728 marked this pull request as ready for review August 6, 2021 01:19
@arithmetic1728 arithmetic1728 requested review from a team and silvolu as code owners August 6, 2021 01:19
@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
@arithmetic1728 arithmetic1728 force-pushed the apikeyheader branch 2 times, most recently from 9ea731c to 1eabe0a Compare September 8, 2021 00:11
@arithmetic1728 arithmetic1728 removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 19, 2022
@arithmetic1728 arithmetic1728 merged commit 3b15092 into main Jan 19, 2022
@arithmetic1728 arithmetic1728 deleted the apikeyheader branch January 19, 2022 22:55
gcf-merge-on-green bot pushed a commit that referenced this pull request Jan 20, 2022
🤖 I have created a release *beep* *boop*
---


## [2.4.0](v2.3.3...v2.4.0) (2022-01-20)


### Features

* add 'py.typed' declaration ([#919](#919)) ([c993504](c993504))
* add api key support ([#826](#826)) ([3b15092](3b15092))


### Bug Fixes

* **deps:** allow cachetools 5.0 for python 3.7+ ([#937](#937)) ([1eae37d](1eae37d))
* fix the message format for metadata server exception ([#916](#916)) ([e756f08](e756f08))


### Documentation

* fix intersphinx link for 'requests-oauthlib' ([#921](#921)) ([967be4f](967be4f))
* note ValueError in `verify_oauth2_token` ([#928](#928)) ([82bc5f0](82bc5f0))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
arithmetic1728 added a commit that referenced this pull request Jan 28, 2022
arithmetic1728 added a commit that referenced this pull request Jan 31, 2022
This reverts commit 3b15092.

Co-authored-by: Anthonios Partheniou <[email protected]>
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Nov 26, 2025
🤖 I have created a release *beep* *boop*
---


## [2.4.0](googleapis/google-auth-library-python@v2.3.3...v2.4.0) (2022-01-20)


### Features

* add 'py.typed' declaration ([#919](googleapis/google-auth-library-python#919)) ([c993504](googleapis/google-auth-library-python@c993504))
* add api key support ([#826](googleapis/google-auth-library-python#826)) ([3b15092](googleapis/google-auth-library-python@3b15092))


### Bug Fixes

* **deps:** allow cachetools 5.0 for python 3.7+ ([#937](googleapis/google-auth-library-python#937)) ([1eae37d](googleapis/google-auth-library-python@1eae37d))
* fix the message format for metadata server exception ([#916](googleapis/google-auth-library-python#916)) ([e756f08](googleapis/google-auth-library-python@e756f08))


### Documentation

* fix intersphinx link for 'requests-oauthlib' ([#921](googleapis/google-auth-library-python#921)) ([967be4f](googleapis/google-auth-library-python@967be4f))
* note ValueError in `verify_oauth2_token` ([#928](googleapis/google-auth-library-python#928)) ([82bc5f0](googleapis/google-auth-library-python@82bc5f0))

---
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 join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants