Skip to content

Commit a6af6fa

Browse files
committed
Clean up acquire_for_client(...) signature
1 parent 8317201 commit a6af6fa

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

msal/application.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -327,19 +327,12 @@ def acquire_token(
327327

328328
class ConfidentialClientApplication(ClientApplication): # server-side web app
329329

330-
def acquire_token_for_client(self, scope, force_refresh=False):
331-
"""Acquires token from the service for the confidential client.
332-
333-
:param force_refresh:
334-
This method attempts to look up valid access token in the cache.
335-
If this parameter is set to True,
336-
this method will ignore the access token in the cache
337-
and attempt to acquire new access token using client credentials
338-
"""
339-
# TODO: force_refresh will be implemented after the cache mechanism is ready
340-
return self.client.obtain_token_with_client_credentials(
341-
scope=scope, # This grant flow requires no scope decoration
342-
)
330+
def acquire_token_for_client(self, scopes, **kwargs):
331+
"""Acquires token from the service for the confidential client."""
332+
# TBD: force_refresh behavior
333+
return self.client.obtain_token_for_client(
334+
scope=scopes, # This grant flow requires no scope decoration
335+
**kwargs)
343336

344337
def acquire_token_on_behalf_of(
345338
self, user_assertion, scope, authority=None, policy=''):

0 commit comments

Comments
 (0)