Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Migrate SignedJwtAssertionCredentials to ServiceAccountCredentials #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Zenahr
Copy link

@Zenahr Zenahr commented Oct 14, 2020

Explanation:
SignedJwtAssertionCredentials was removed from the oath2client python package in the 2.0.0 update. It was no more under oauth2client.client. The behaviour has been moved onto oauth2client.service_account.ServiceAccountCredentials.

See this SO thread for more info.

Additional Notes

Developers need to perform following tasks on their dependencies in order for this to work:

pip install pyOpenSSL
pip install --upgrade oauth2client

…s to ServiceAccountCredentials

Explanation:
SignedJwtAssertionCredentials was removed from the oath2client python package in the 2.0.0 update. It was no more under oauth2client.client. The behaviour has been moved onto oauth2client.service_account.ServiceAccountCredentials.

See [this SO thread](https://stackoverflow.com/a/35666374/12675239) for more info.

## Additional Notes

Developers need to perform following tasks on their dependencies in order for this to work:

`pip install pyOpenSSL`
`pip install --upgrade oauth2client`
@google-cla
Copy link

google-cla bot commented Oct 14, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Oct 14, 2020
Copy link
Author

@Zenahr Zenahr left a comment

Choose a reason for hiding this comment

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

CLA signed.

@Zenahr
Copy link
Author

Zenahr commented Oct 15, 2020

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Oct 15, 2020
@Zenahr Zenahr changed the title Migrate [DEPRECATED]SignedJwtAssertionCredentials to ServiceAccountCredentials Migrate SignedJwtAssertionCredentials to ServiceAccountCredentials Oct 15, 2020
@@ -21,6 +21,7 @@
from apiclient.discovery import build
import httplib2
from oauth2client import client
from oauth2client.service_account import ServiceAccountCredentials
Copy link

Choose a reason for hiding this comment

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

I think you forgot to actually use it. You are still using SignedJwtAssertionCredentials.

Copy link

Choose a reason for hiding this comment

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

Also, oauth2client is deprecated now, so I would probably completely replace this sample with one using the Credentials from google.oauth2 instead.

NOTE: I am not part of the Google community, just sharing my opinion

Copy link
Author

Choose a reason for hiding this comment

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

I think you forgot to actually use it. You are still using SignedJwtAssertionCredentials.

You're right! I overlooked that.

Also, oauth2client is deprecated now, so I would probably completely replace this sample with one using the Credentials from google.oauth2 instead.

NOTE: I am not part of the Google community, just sharing my opinion

Yeah, I'll leave it open to Google and on how they decide to proceed with the samples. Good to have your comment here though for others to read.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants