scenario - developer tries to access service protected with MS Negotiate... but Kerberos is not supported (like the SPN is not set correctly). the code tries NTLM but if there is no password the NTLM module throws an error. Capture this and raise our own error with this information blatantly stated.
Traceback (most recent call last):
File "", line 1, in
File "C:\tmp\lib\site-packages\requests\sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "C:\tmp\lib\site-packages\requests\sessions.py", line 474, in request
prep = self.prepare_request(req)
File "C:\tmp\lib\site-packages\requests\sessions.py", line 407, in prepare_requ
hooks=merge_hooks(request.hooks, self.hooks),
File "C:\tmp\lib\site-packages\requests\models.py", line 306, in prepare
self.prepare_auth(auth, url)
File "C:\tmp\lib\site-packages\requests\models.py", line 543, in prepare_auth
r = auth(self)
File "requests_arcgis_auth\arcgis_auth.py", line 136, in call
self._init(r)
File "requests_arcgis_auth\arcgis_auth.py", line 151, in _init
self._determine_auth_handler(r)
File "requests_arcgis_auth\arcgis_auth.py", line 181, in _determine_auth_handler
self._last_request = requests.head(r.url,auth=HttpNtlmAuth(self.username,self.password),verify=self.verify)
File "C:\tmp\lib\site-packages\requests_ntlm\requests_ntlm.py", line 28, in __i
self.domain, self.username = username.split('\', 1)
AttributeError: 'NoneType' object has no attribute 'split'
scenario - developer tries to access service protected with MS Negotiate... but Kerberos is not supported (like the SPN is not set correctly). the code tries NTLM but if there is no password the NTLM module throws an error. Capture this and raise our own error with this information blatantly stated.