8000 feat: Add public API load_credentials_from_dict by clundin25 · Pull Request #1326 · googleapis/google-auth-library-python · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

feat: Add public API load_credentials_from_dict#1326

Merged
clundin25 merged 3 commits intogoogleapis:mainfrom
clundin25:new-dict-default
Jun 8, 2023
Merged

feat: Add public API load_credentials_from_dict#1326
clundin25 merged 3 commits intogoogleapis:mainfrom
clundin25:new-dict-default

Conversation

@clundin25
Copy link
Contributor

Add public API load_credentials_from_dict to allow creating a default credential object from a dictionary.

This resolves #1313.

…efault credential object from a dictionary.

This resolves googleapis#1313.
@clundin25 clundin25 requested review from a team June 7, 2023 20:11
@clundin25 clundin25 requested a review from a team as a code owner June 7, 2023 20:11
assert excinfo.match(r"not found")


def test_load_credentials_from_dict_non_dict_object():
Copy link
Contributor Author

Choose a reason for hiding this comment

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

load_credentials_from_file has extensive test coverage, and load_credentials_from_dict only varies by the input type.

)

return _load_credentials_from_info(
"dict object", info, scopes, default_scopes, quota_project_id, request
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The filename param is only used for logging purposes. I can make a more invasive change if that is desirable.

@clundin25 clundin25 added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 8, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 8, 2023
@clundin25 clundin25 merged commit 5467ad7 into googleapis:main Jun 8, 2023
gcf-merge-on-green bot pushed a commit that referenced this pull request Jun 13, 2023
🤖 I have created a release *beep* *boop*
---


## [2.20.0](https://togithub.com/googleapis/google-auth-library-python/compare/v2.19.1...v2.20.0) (2023-06-12)


### Features

* Add public API load_credentials_from_dict ([#1326](https://togithub.com/googleapis/google-auth-library-python/issues/1326)) ([5467ad7](https://togithub.com/googleapis/google-auth-library-python/commit/5467ad75334ee0b5e23522679171cda5fd4edb8a))


### Bug Fixes

* Expiry in compute_engine.IDTokenCredentials ([#1327](https://togithub.com/googleapis/google-auth-library-python/issues/1327)) ([56a6159](https://togithub.com/googleapis/google-auth-library-python/commit/56a6159444467717f5a5e3c04aa678bd0a5881da)), closes [#1323](https://togithub.com/googleapis/google-auth-library-python/issues/1323)
* Expiry in impersonated_credentials.IDTokenCredentials ([#1330](https://togithub.com/googleapis/google-auth-library-python/issues/1330)) ([d1b887c](https://togithub.com/googleapis/google-auth-library-python/commit/d1b887c4bebbe4ad0df6d8f7eb6a6d50355a135d))
* Invalid `dev` version identifiers in `setup.py` ([#1322](https://togithub.com/googleapis/google-auth-library-python/issues/1322)) ([a9b8f12](https://togithub.com/googleapis/google-auth-library-python/commit/a9b8f12db0c3ff4f84939646ba0777d21e68f572)), closes [#1321](https://togithub.com/googleapis/google-auth-library-python/issues/1321)

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

publicly expose _default._load_credentials_from_info

3 participants

0