File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change
1
+ import json
1
2
import webbrowser
2
3
import httplib2
3
4
import oauth2client .clientsecrets as clientsecrets
@@ -310,6 +311,12 @@ def ServiceAuth(self):
310
311
scopes = scopes_to_string (self .settings ["oauth_scope" ])
311
312
keyfile_name = self .client_config .get ("client_json_file_path" )
312
313
keyfile_dict = self .client_config .get ("client_json_dict" )
314
+ keyfile_json = self .client_config .get ("client_json" )
315
+
316
+ if not keyfile_dict and keyfile_json :
317
+ # Compensating for missing ServiceAccountCredentials.from_json_keyfile
318
+ keyfile_dict = json .loads (keyfile_json )
319
+
313
320
if keyfile_dict :
314
321
self .credentials = (
315
322
ServiceAccountCredentials .from_json_keyfile_dict (
Original file line number Diff line number Diff line change 82
82
"required" : False ,
83
83
"struct" : {},
84
84
},
85
+ "client_json" : {"type" : str , "required" : False },
85
86
},
86
87
},
87
88
"oauth_scope" : {
You can’t perform that action at this time.
0 commit comments