Skip to content

Commit ab4cac4

Browse files
committed
Rename a helper inspired by an internal conversation
In a recent intense discussion during api review, different teams have different interpretation on "silent". One team attmpted to add some non-interactive flows into acquire_token_silent(). That attempt to changing public API behavior was rejected. Nonetheless, this commit aims to discourage such interpretation in the first place by giving a more precise name to an internal helper.
1 parent 7c241fc commit ab4cac4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

msal/application.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,20 +400,21 @@ def acquire_token_silent(
400400
# authority,
401401
# verify=self.verify, proxies=self.proxies, timeout=self.timeout,
402402
# ) if authority else self.authority
403-
result = self._acquire_token_silent(scopes, account, self.authority, **kwargs)
403+
result = self._acquire_token_silent_from_cache_and_possibly_refresh_it(
404+
scopes, account, self.authority, **kwargs)
404405
if result:
405406
return result
406407
for alias in self._get_authority_aliases(self.authority.instance):
407408
the_authority = Authority(
408409
"https://" + alias + "/" + self.authority.tenant,
409410
validate_authority=False,
410411
verify=self.verify, proxies=self.proxies, timeout=self.timeout)
411-
result = self._acquire_token_silent(
412+
result = self._acquire_token_silent_from_cache_and_possibly_refresh_it(
412413
scopes, account, the_authority, **kwargs)
413414
if result:
414415
return result
415416

416-
def _acquire_token_silent(
417+
def _acquire_token_silent_from_cache_and_possibly_refresh_it(
417418
self,
418419
scopes, # type: List[str]
419420
account, # type: Optional[Account]

0 commit comments

Comments
 (0)