且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用httplib2处理身份验证和代理服务器

更新时间:2023-11-30 18:29:52

您能显示所获得的401响应的完整标题吗?也许这不是基本的身份验证请求,可能是代理服务器需要自己的身份验证-很难看到没有所述标头的信息!

Can you show the full headers of the 401 response you're getting? Maybe it's not a basic auth request, maybe it's the proxy wanting its own authentication -- it's hard to guess without seeing said headers!

编辑:感谢您显示标题(我将其重新格式化为代码",否则无法读取).

Edit: thanks for showing the headers (I reformatted them as "code" else they were unreadable).

正如我所怀疑的那样,它不需要基本",而需要其他一些(Nexus专有...?)"NxBASIC"身份验证协议-我从没听说过(我对此一无所知Nexus),我想您都不会使用基本身份验证处理程序(即使NxBASIC某种程度上接受了普通的基本身份验证,该处理程序仅知道它是一个不同的协议,也不会提供这种身份验证).

As I suspected, it doesn't want "Basic", it wants some other (Nexus proprietary...?) "NxBASIC" authentication protocol -- I've never heard about it (I don't know anything about Nexus) and I imagine neither has the basic authentication handler you're using (even if NxBASIC somehow accepted plain Basic authentication, the handler, knowing only that it's a different protocol, would not offer such authentication).

因此,首先,您需要准确研究NxBASIC的含义,为此,我怀疑带有正确标签的SO问题可能会有所帮助.然后,根据您所学的知识,出现了一个有趣的问题,即为其定义处理程序...!-(

So, first you need to research exactly what that NxBASIC thing is, and for that I suspect a SO question with the right tags might help. Then, depending on what you learn, comes the interesting issue of defining a handler for it...!-(