Is there an equivalent to HttpNegotiateAuth? #1847
-
Hello. I am looking for advice on how to authenticate using the HttpNegotiateAuth from requests_negotiate_sspi with asychronous requests. I previously had used this authentication successfully with zeep and synchronous calls. However, I am now trying to make an asynchronous request (zeep in this case leverages httpx) -- but the authentication mode above does not work - I am getting 401 (unauthorised for URL). Code as below:
Did I do something wrong in the above code? Or maybe there is an easy way to do this authentication without zeep and using httpx alone? Could anyone give advice on best practice here. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't know of any third party packages for We might well want to have |
Beta Was this translation helpful? Give feedback.
I don't know of any third party packages for
httpx
that provide an HTTP Negotiate authentication implementation, no.We might well want to have
httpx
raise an exception at this point...httpx.AsyncClient(auth=HttpNegotiateAuth())
because you're passing the wrong type, which just isn't going to work. I do also recall another user who was trying to use a requests authentication class withhttpx
, so you're not the first person to try something like this.