-
Notifications
You must be signed in to change notification settings - Fork 283
Migrate SignedJwtAssertionCredentials to ServiceAccountCredentials #67
base: master
Are you sure you want to change the base?
Conversation
…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`
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 What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
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.
@googlebot I signed it! |
@@ -21,6 +21,7 @@ | |||
from apiclient.discovery import build | |||
import httplib2 | |||
from oauth2client import client | |||
from oauth2client.service_account import ServiceAccountCredentials |
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
.
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 the Credentials
from google.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,
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
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.
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