Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@dhermes
Copy link
Contributor

@dhermes dhermes commented Feb 13, 2015

Fixes #638.

@jgeewax PTAL

I thought about wrapping JSON key and PKCS12 key into one method but the JSON key is actual a JSON payload with everything needed, e.g.

{
  "private_key_id": "0996.....",
  "private_key": "-----BEGIN PRIVATE KEY-----\nMIICdgIBADA.....\n-----END PRIVATE KEY-----\n",
  "client_email": "32578400.......@developer.gserviceaccount.com",
  "client_id": "32578400.........apps.googleusercontent.com",
  "type": "service_account"
}

whereas a P12 key is just the bytes in private_key (and created for PKCS12 rather than PEM).

I don't think it's worth trying to smash together the two API surfaces:

get_for_service_account_json(private_key_path, scope=None)
get_for_service_account_p12(client_email, private_key_path, scope=None)

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 13, 2015
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 66b47b5 on dhermes:fix-638 into c6718f3 on GoogleCloudPlatform:master.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@jgeewax
Copy link
Contributor

jgeewax commented Feb 14, 2015

This LGTM.

That said - I think it'd be useful to add an example which would ideally go in a separate "auth" section in the docs. Do we have an open issue for that or should I create one?

@jgeewax jgeewax added the auth label Feb 14, 2015
@dhermes
Copy link
Contributor Author

dhermes commented Feb 14, 2015

#633 is the issue, I actually have a branch I've been working on for awhile, I just keep getting sidetracked on it.

@dhermes
Copy link
Contributor Author

dhermes commented Feb 15, 2015

Renamed to json_credentials_path. @tseaver can you give a quick look before I merge?

This comment was marked as spam.

@tseaver
Copy link
Contributor

tseaver commented Feb 15, 2015

LGTM after pep8 passes.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling a80f1dd on dhermes:fix-638 into f64fc55 on GoogleCloudPlatform:master.

dhermes added a commit that referenced this pull request Feb 15, 2015
Adding get_for_service_account_json function in credentials.
@dhermes dhermes merged commit 61c6814 into googleapis:master Feb 15, 2015
@dhermes dhermes deleted the fix-638 branch February 15, 2015 19:13
vchudnov-g pushed a commit that referenced this pull request Sep 20, 2023
* feat: added dialogflow_assist_answer
feat: added session_ttl
feat: added human_agent_side_config
feat: added suggestion_input
feat: added suggest_dialogflow_assists_response
feat: added suggest_entity_extraction_response

PiperOrigin-RevId: 542021587

Source-Link: googleapis/googleapis@f40416d

Source-Link: googleapis/googleapis-gen@04ca491
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDRjYTQ5MWRlYzhmMzUxNzNlZTU5OWQ3ZWQwNzkzNmI0MDg2ZTk2ZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: added dialogflow_assist_answer
feat: added session_ttl
feat: added human_agent_side_config
feat: added suggestion_input
feat: added suggest_dialogflow_assists_response
feat: added suggest_entity_extraction_response

PiperOrigin-RevId: 542024928

Source-Link: googleapis/googleapis@06f7999

Source-Link: googleapis/googleapis-gen@0f124f3
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGYxMjRmM2MzN2I1YTYwNDk5MDZhOTUxNGNkOTk0ZGFmMDczZGMwMSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 18, 2025
Source-Link: googleapis/synthtool@cb96037
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
The return type is an Awaitable that produces an AsyncIterator.
parthea pushed a commit that referenced this pull request Nov 24, 2025
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 473833416

Source-Link: googleapis/googleapis@565a550

Source-Link: googleapis/googleapis-gen@1ee1a06
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWVlMWEwNmM2ZGUzY2E4Yjg0MzU3MmMxZmRlMDU0OGY4NDIzNjk4OSJ9

feat: add firestore aggregation query apis to the stable googleapis branch
PiperOrigin-RevId: 473753776

Source-Link: googleapis/googleapis@a8c6c7c

Source-Link: googleapis/googleapis-gen@6e3b0d6
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmUzYjBkNmVhZDQyNjVjYTZmMGFkM2UxODI5ZjRlM2E1YmMxMDlhMiJ9
parthea pushed a commit that referenced this pull request Nov 24, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 25, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 26, 2025
🤖 I have created a release \*beep\* \*boop\* 
---
## [1.23.0](https://www.github.com/googleapis/google-auth-library-python/compare/v1.22.1...v1.23.0) (2020-10-29)


### Features

* Add custom scopes for access tokens from the metadata service ([#633](https://www.github.com/googleapis/google-auth-library-python/issues/633)) ([0323cf3](https://www.github.com/googleapis/google-auth-library-python/commit/0323cf390b16e8483660ac88775e8ea4e7f7702d))


### Bug Fixes

* **deps:** Revert "fix: pin 'aoihttp < 3.7.0dev' ([#634](https://www.github.com/googleapis/google-auth-library-python/issues/634))" ([#632](https://www.github.com/googleapis/google-auth-library-python/issues/632)) ([#640](https://www.github.com/googleapis/google-auth-library-python/issues/640)) ([b790e65](https://www.github.com/googleapis/google-auth-library-python/commit/b790e6535cc37591b23866027a426cde312e07c1))
* pin 'aoihttp < 3.7.0dev' ([#634](https://www.github.com/googleapis/google-auth-library-python/issues/634)) ([05f9524](https://www.github.com/googleapis/google-auth-library-python/commit/05f95246fab928fe2f445781117eeac8088497fb))
* remove checks for ancient versions of Cryptography ([#596](https://www.github.com/googleapis/google-auth-library-python/issues/596)) ([6407258](https://www.github.com/googleapis/google-auth-library-python/commit/6407258956ec42e3b722418cb7f366e5ae9272ec)), closes [/github.com/googleapis/google-auth-library-python/issues/595#issuecomment-683903062](https://www.github.com/googleapis//github.com/googleapis/google-auth-library-python/issues/595/issues/issuecomment-683903062)
---


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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow users to specify p12/json credentials file

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.