Skip to content
This repository was archived by the owner on Jan 18, 2025. It is now read-only.

Commit 46b942b

Browse files
committed
Fixing create_scoped to set token|revoke_uri after the fact.
1 parent 91fd90d commit 46b942b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

oauth2client/service_account.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,13 @@ def create_scoped_required(self):
333333
return not self._scopes
334334

335335
def create_scoped(self, scopes):
336-
return self.__class__(self._service_account_email,
337-
self._private_key_pkcs8_pem,
338-
scopes=scopes,
339-
private_key_id=self._private_key_id,
340-
service_account_id=self._service_account_id,
341-
user_agent=self._user_agent,
342-
token_uri=self.token_uri,
343-
revoke_uri=self.revoke_uri,
344-
**self._kwargs)
336+
result = self.__class__(self._service_account_email,
337+
self._private_key_pkcs8_pem,
338+
scopes=scopes,
339+
private_key_id=self._private_key_id,
340+
service_account_id=self._service_account_id,
341+
user_agent=self._user_agent,
342+
**self._kwargs)
343+
result.token_uri = self.token_uri
344+
result.revoke_uri = self.revoke_uri
345+
return result

0 commit comments

Comments
 (0)