@@ -172,21 +172,18 @@ def _prompt_launching_ui(ui=None, **_):
172172 )
173173 return check_result (result )
174174
175- def login_with_device_code (self , scopes , claims_challenge = None ):
176- flow = self ._msal_app .initiate_device_flow (scopes , claims_challenge = claims_challenge )
175+ def login_with_device_code (self , scopes , ** kwargs ):
176+ flow = self ._msal_app .initiate_device_flow (scopes , ** kwargs )
177177 if "user_code" not in flow :
178178 raise ValueError (
179179 "Fail to create device flow. Err: %s" % json .dumps (flow , indent = 4 ))
180180 from azure .cli .core .style import print_styled_text , Style
181181 print_styled_text ((Style .WARNING , flow ["message" ]), file = sys .stderr )
182- result = self ._msal_app .acquire_token_by_device_flow (
183- flow ,
184- claims_challenge = claims_challenge
185- ) # By default, it will block
182+ result = self ._msal_app .acquire_token_by_device_flow (flow , ** kwargs ) # By default it will block
186183 return check_result (result )
187184
188- def login_with_username_password (self , username , password , scopes ):
189- result = self ._msal_app .acquire_token_by_username_password (username , password , scopes )
185+ def login_with_username_password (self , username , password , scopes , ** kwargs ):
186+ result = self ._msal_app .acquire_token_by_username_password (username , password , scopes , ** kwargs )
190187 return check_result (result )
191188
192189 def login_with_service_principal (self , client_id , credential , scopes ):
0 commit comments