Skip to content

Commit e56cdd3

Browse files
jiaslirayluo
andauthored
Pass kwargs to acquire_token_by_refresh_token (#298)
Pass kwargs to acquire_token_by_refresh_token Co-authored-by: Ray Luo <[email protected]>
1 parent 58ad48c commit e56cdd3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

msal/application.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ def _validate_ssh_cert_input_data(self, data):
952952
"you must include a string parameter named 'key_id' "
953953
"which identifies the key in the 'req_cnf' argument.")
954954

955-
def acquire_token_by_refresh_token(self, refresh_token, scopes):
955+
def acquire_token_by_refresh_token(self, refresh_token, scopes, **kwargs):
956956
"""Acquire token(s) based on a refresh token (RT) obtained from elsewhere.
957957
958958
You use this method only when you have old RTs from elsewhere,
@@ -975,6 +975,7 @@ def acquire_token_by_refresh_token(self, refresh_token, scopes):
975975
* A dict contains "error" and some other keys, when error happened.
976976
* A dict contains no "error" key means migration was successful.
977977
"""
978+
self._validate_ssh_cert_input_data(kwargs.get("data", {}))
978979
return self.client.obtain_token_by_refresh_token(
979980
refresh_token,
980981
scope=decorate_scope(scopes, self.client_id),
@@ -986,7 +987,7 @@ def acquire_token_by_refresh_token(self, refresh_token, scopes):
986987
rt_getter=lambda rt: rt,
987988
on_updating_rt=False,
988989
on_removing_rt=lambda rt_item: None, # No OP
989-
)
990+
**kwargs)
990991

991992

992993
class PublicClientApplication(ClientApplication): # browser app or mobile app
@@ -1305,4 +1306,3 @@ def acquire_token_on_behalf_of(self, user_assertion, scopes, claims_challenge=No
13051306
self.ACQUIRE_TOKEN_ON_BEHALF_OF_ID),
13061307
},
13071308
**kwargs)
1308-

0 commit comments

Comments
 (0)