From 6cc8a63825c81807ee1133707d64870bc25e7604 Mon Sep 17 00:00:00 2001 From: Jiashuo Li Date: Tue, 26 Jan 2021 17:44:11 +0800 Subject: [PATCH 1/2] Pass kwargs to acquire_token_by_refresh_token --- msal/application.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/msal/application.py b/msal/application.py index fcd0d072..866e2a26 100644 --- a/msal/application.py +++ b/msal/application.py @@ -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, @@ -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), @@ -976,6 +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 ) @@ -1294,4 +1296,3 @@ def acquire_token_on_behalf_of(self, user_assertion, scopes, claims_challenge=No self.ACQUIRE_TOKEN_ON_BEHALF_OF_ID), }, **kwargs) - From e668dc637233a11b9ad16b8b928dbe054244510c Mon Sep 17 00:00:00 2001 From: Ray Luo Date: Tue, 2 Feb 2021 21:14:50 -0800 Subject: [PATCH 2/2] Minor change Just trying to trigger our CI --- msal/application.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/msal/application.py b/msal/application.py index 866e2a26..80384eea 100644 --- a/msal/application.py +++ b/msal/application.py @@ -977,8 +977,7 @@ def acquire_token_by_refresh_token(self, refresh_token, scopes, **kwargs): rt_getter=lambda rt: rt, on_updating_rt=False, on_removing_rt=lambda rt_item: None, # No OP - **kwargs - ) + **kwargs) class PublicClientApplication(ClientApplication): # browser app or mobile app