File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed
Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -239,14 +239,7 @@ def default_headers(self) -> dict[str, str | Omit]:
239239
240240 @override
241241 def _validate_headers (self , headers : Headers , custom_headers : Headers ) -> None :
242- if self .access_token and headers .get ("Authorization" ):
243- return
244- if isinstance (custom_headers .get ("Authorization" ), Omit ):
245- return
246-
247- if self .client_id and self .client_secret and headers .get ("Authorization" ):
248- return
249- if isinstance (custom_headers .get ("Authorization" ), Omit ):
242+ if headers .get ("Authorization" ) or isinstance (custom_headers .get ("Authorization" ), Omit ):
250243 return
251244
252245 raise TypeError (
@@ -589,14 +582,7 @@ def default_headers(self) -> dict[str, str | Omit]:
589582
590583 @override
591584 def _validate_headers (self , headers : Headers , custom_headers : Headers ) -> None :
592- if self .access_token and headers .get ("Authorization" ):
593- return
594- if isinstance (custom_headers .get ("Authorization" ), Omit ):
595- return
596-
597- if self .client_id and self .client_secret and headers .get ("Authorization" ):
598- return
599- if isinstance (custom_headers .get ("Authorization" ), Omit ):
585+ if headers .get ("Authorization" ) or isinstance (custom_headers .get ("Authorization" ), Omit ):
600586 return
601587
602588 raise TypeError (
You can’t perform that action at this time.
0 commit comments