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

feat: add api key credential as client library authorization type #1483

Merged
merged 16 commits into from
Sep 20, 2024

Conversation

ldetmer
Copy link
Contributor

@ldetmer ldetmer commented Aug 28, 2024

Add new ApiKeyCredentials that will pass the appropriate api-key header for authorizing api requests from client libraries

Note: ApiKeyCredentials extends from the base Credential class as Api Keys are not considered oauth2 credentials since there is no access token which is required by GoogleCredentials/OAuth2Credentials. This also follows definition of oauth2 credentials as specified by Google Identity Protocols that require an access token when using Oauth 2.0 to access google APIs.

Copy link

conventional-commit-lint-gcf bot commented Aug 28, 2024

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Sep 16, 2024
@ldetmer ldetmer changed the title [POC] add api key credential feat: add api key credential as authorization type Sep 16, 2024
@ldetmer ldetmer marked this pull request as ready for review September 16, 2024 20:38
@ldetmer ldetmer requested review from a team as code owners September 16, 2024 20:38
@ldetmer ldetmer changed the title feat: add api key credential as authorization type feat: add api key credential as client library authorization type Sep 16, 2024
@lqiu96
Copy link
Contributor

lqiu96 commented Sep 17, 2024

I think the changes LGTM. I'll need to double check the authenticationType being "" and the refresh() behavior.

@ldetmer
Copy link
Contributor Author

ldetmer commented Sep 17, 2024

I think the changes LGTM. I'll need to double check the authenticationType being "" and the refresh() behavior.

FYI, Blake and I discussed refresh with Carl and he agreed no op was correct.

@lqiu96
Copy link
Contributor

lqiu96 commented Sep 17, 2024

I think the changes LGTM. I'll need to double check the authenticationType being "" and the refresh() behavior.

FYI, Blake and I discussed refresh with Carl and he agreed no op was correct.

Yep. I think it makes sense just wanted to confirm the behavior and I think it works as intended. I'll ask about the authenticationType with the Auth Team and once I get their input on this, I think we should be good to go.

@burkedavison
Copy link
Member

LGTM

Copy link
Contributor

@lqiu96 lqiu96 left a comment

Choose a reason for hiding this comment

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

LGTM.

@zhumin8 for approval as well

Copy link

@ldetmer ldetmer merged commit 6401e51 into main Sep 20, 2024
18 checks passed
@ldetmer ldetmer deleted the api-keys branch September 20, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants