- Notifications
You must be signed in to change notification settings - Fork279
Migrate SignedJwtAssertionCredentials to ServiceAccountCredentials#67
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…s to ServiceAccountCredentialsExplanation: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 NotesDevelopers need to perform following tasks on their dependencies in order for this to work:`pip install pyOpenSSL``pip install --upgrade oauth2client`
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 visithttps://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️Googlers:Go here for more info. |
ZenaMel left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
CLA signed.
ZenaMel commentedOct 15, 2020
@googlebot I signed it! |
| fromapiclient.discoveryimportbuild | ||
| importhttplib2 | ||
| fromoauth2clientimportclient | ||
| fromoauth2client.service_accountimportServiceAccountCredentials |
There was a problem hiding this comment.
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 usingSignedJwtAssertionCredentials.
There was a problem hiding this comment.
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 theCredentials fromgoogle.oauth2 instead.
NOTE: I am not part of the Google community, just sharing my opinion
There was a problem hiding this comment.
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,
oauth2clientis deprecated now, so I would probably completely replace this sample with one using theCredentialsfromgoogle.oauth2instead.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.
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.
Seethis SO thread for more info.
Additional Notes
Developers need to perform following tasks on their dependencies in order for this to work:
pip install pyOpenSSLpip install --upgrade oauth2client