(20241128) Files upgraded.

This commit is contained in:
2024-11-28 12:56:54 +05:30
parent bccbd66569
commit adecc1f830
6 changed files with 257 additions and 39 deletions
+15
View File
@@ -204,6 +204,21 @@ class GoogleAuthTokens(BaseModel):
force_refresh = force_refresh
)
def has_scopes(self, scopes: List[str]) -> bool:
"""
Check if all the specified scopes were granted.
:param scopes: The list of scopes to check. These are the permissions you need.
:return: True if all specified scoped are present, else False.
"""
# Start by assuming success:
has_scopes = True
# Now loop through the needed scopes and check:
for scope in scopes:
if scope not in self.scopes
# *****************************************************************************************************************
# ***** ****