Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions msal/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ def _validate_ssh_cert_input_data(self, data):
"you must include a string parameter named 'key_id' "
"which identifies the key in the 'req_cnf' argument.")

def acquire_token_by_refresh_token(self, refresh_token, scopes):
def acquire_token_by_refresh_token(self, refresh_token, scopes, **kwargs):
"""Acquire token(s) based on a refresh token (RT) obtained from elsewhere.

You use this method only when you have old RTs from elsewhere,
Expand All @@ -965,6 +965,7 @@ def acquire_token_by_refresh_token(self, refresh_token, scopes):
* A dict contains "error" and some other keys, when error happened.
* A dict contains no "error" key means migration was successful.
"""
self._validate_ssh_cert_input_data(kwargs.get("data", {}))
return self.client.obtain_token_by_refresh_token(
refresh_token,
scope=decorate_scope(scopes, self.client_id),
Expand All @@ -976,7 +977,7 @@ def acquire_token_by_refresh_token(self, refresh_token, scopes):
rt_getter=lambda rt: rt,
on_updating_rt=False,
on_removing_rt=lambda rt_item: None, # No OP
)
**kwargs)


class PublicClientApplication(ClientApplication): # browser app or mobile app
Expand Down Expand Up @@ -1294,4 +1295,3 @@ def acquire_token_on_behalf_of(self, user_assertion, scopes, claims_challenge=No
self.ACQUIRE_TOKEN_ON_BEHALF_OF_ID),
},
**kwargs)