@@ -779,7 +779,7 @@ def remove(self, setting):
779
779
return False
780
780
781
781
def aad_config (self , account = None , key = None , client_id = None , tenant = None ,
782
- redirect = None , endpoint = None , unattended = False , ** kwargs ):
782
+ redirect = None , endpoint = None , unattended = False , validate = True , ** kwargs ):
783
783
"""Configure AAD authentication parameters to accompany an existing
784
784
Batch Apps Service.
785
785
If new values are set, :meth:`.save_config()` must be called for
@@ -827,25 +827,29 @@ def aad_config(self, account=None, key=None, client_id=None, tenant=None,
827
827
for setting in auth_cfg :
828
828
self ._config .set ("Authentication" , setting , auth_cfg [setting ])
829
829
830
- if account :
830
+ if account is not None :
831
831
self ._config .set ("Authentication" , "unattended_account" , str (account ))
832
832
833
- if key :
833
+ if key is not None :
834
834
self ._config .set ("Authentication" , "unattended_key" , str (key ))
835
835
836
- if client_id :
836
+ if client_id is not None :
837
837
self ._config .set ("Authentication" , "client_id" , str (client_id ))
838
838
839
- if tenant :
839
+ if tenant is not None :
840
840
self ._config .set ("Authentication" , "tenant" , str (tenant ))
841
841
842
- if redirect :
842
+ if redirect is not None :
843
843
self ._config .set ("Authentication" , "redirect_uri" , str (redirect ))
844
844
845
- if endpoint :
845
+ if endpoint is not None :
846
846
self ._config .set ("Authentication" , "endpoint" , str (endpoint ))
847
847
848
- auth_dict = self ._validate_auth (unattended )
848
+ if validate :
849
+ auth_dict = self ._validate_auth (unattended )
850
+ else :
851
+ auth_dict = dict (self ._config .items ("Authentication" ))
852
+
849
853
return auth_dict
850
854
851
855
def _invalid_data (self , value ):
0 commit comments