@@ -145,7 +145,7 @@ def _service_principal_store(self):
145145 Identity ._service_principal_store_instance = ServicePrincipalStore (store )
146146 return Identity ._service_principal_store_instance
147147
148- def login_with_auth_code (self , scopes , ** kwargs ):
148+ def login_with_auth_code (self , scopes , claims_challenge = None ):
149149 # Emit a warning to inform that a browser is opened.
150150 # Only show the path part of the URL and hide the query string.
151151
@@ -168,21 +168,25 @@ def _prompt_launching_ui(ui=None, **_):
168168 success_template = success_template , error_template = error_template ,
169169 parent_window_handle = self ._msal_app .CONSOLE_WINDOW_HANDLE , on_before_launching_ui = _prompt_launching_ui ,
170170 enable_msa_passthrough = True ,
171- ** kwargs )
171+ claims_challenge = claims_challenge
172+ )
172173 return check_result (result )
173174
174- def login_with_device_code (self , scopes , ** kwargs ):
175- flow = self ._msal_app .initiate_device_flow (scopes , ** kwargs )
175+ def login_with_device_code (self , scopes , claims_challenge = None ):
176+ flow = self ._msal_app .initiate_device_flow (scopes , claims_challenge = claims_challenge )
176177 if "user_code" not in flow :
177178 raise ValueError (
178179 "Fail to create device flow. Err: %s" % json .dumps (flow , indent = 4 ))
179180 from azure .cli .core .style import print_styled_text , Style
180181 print_styled_text ((Style .WARNING , flow ["message" ]), file = sys .stderr )
181- result = self ._msal_app .acquire_token_by_device_flow (flow , ** kwargs ) # By default it will block
182+ result = self ._msal_app .acquire_token_by_device_flow (
183+ flow ,
184+ claims_challenge = claims_challenge
185+ ) # By default, it will block
182186 return check_result (result )
183187
184- def login_with_username_password (self , username , password , scopes , ** kwargs ):
185- result = self ._msal_app .acquire_token_by_username_password (username , password , scopes , ** kwargs )
188+ def login_with_username_password (self , username , password , scopes ):
189+ result = self ._msal_app .acquire_token_by_username_password (username , password , scopes )
186190 return check_result (result )
187191
188192 def login_with_service_principal (self , client_id , credential , scopes ):
0 commit comments