@@ -58,7 +58,6 @@ def __init__(
5858 client_id = None ,
5959 client_secret = None ,
6060 scopes = None ,
61- quota_project_id = None ,
6261 ):
6362 """
6463 Args:
@@ -82,9 +81,6 @@ def __init__(
8281 token if refresh information is provided (e.g. The refresh
8382 token scopes are a superset of this or contain a wild card
8483 scope like 'https://www.googleapis.com/auth/any-api').
85- quota_project_id (Optional[str]): The project ID used for quota and billing.
86- This project may be different from the project used to
87- create the credentials.
8884 """
8985 super (Credentials , self ).__init__ ()
9086 self .token = token
@@ -94,7 +90,6 @@ def __init__(
9490 self ._token_uri = token_uri
9591 self ._client_id = client_id
9692 self ._client_secret = client_secret
97- self ._quota_project_id = quota_project_id
9893
9994 @property
10095 def refresh_token (self ):
@@ -128,11 +123,6 @@ def client_secret(self):
128123 """Optional[str]: The OAuth 2.0 client secret."""
129124 return self ._client_secret
130125
131- @property
132- def quota_project_id (self ):
133- """Optional[str]: The project to use for quota and billing purposes."""
134- return self ._quota_project_id
135-
136126 @property
137127 def requires_scopes (self ):
138128 """False: OAuth 2.0 credentials have their scopes set when
@@ -179,12 +169,6 @@ def refresh(self, request):
179169 )
180170 )
181171
182- @_helpers .copy_docstring (credentials .Credentials )
183- def apply (self , headers , token = None ):
184- super (Credentials , self ).apply (headers , token = token )
185- if self .quota_project_id is not None :
186- headers ["x-goog-user-project" ] = self .quota_project_id
187-
188172 @classmethod
189173 def from_authorized_user_info (cls , info , scopes = None ):
190174 """Creates a Credentials instance from parsed authorized user info.
@@ -218,9 +202,6 @@ def from_authorized_user_info(cls, info, scopes=None):
218202 scopes = scopes ,
219203 client_id = info ["client_id" ],
220204 client_secret = info ["client_secret" ],
221- quota_project_id = info .get (
222- "quota_project_id"
223- ), # quota project may not exist
224205 )
225206
226207 @classmethod
0 commit comments