2013-03-04 120 views
2

我正尝试在我的django应用中使用django-social-auth。尽管我的Mac上的一切都正常,但是当我尝试在Windows计算机上使用相同的代码时,我需要407代理身份验证。407需要代理验证

<urlopen error Tunnel connection failed: 407 Proxy Authentication Required (Forefront 

TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )> 

任何帮助将不胜感激。

+0

听起来像您的本地代理配置问题。 – geoffspear 2013-03-04 14:16:55

回答

1
Forefront TMG requires authorization to fulfill the request 

它看起来像您的机器配置(需要?)通过代理服务器(在这种情况下,微软的TMG)路由出站流量。当用户尝试使用您的应用程序进行身份验证时,Django正尝试连接到另一个服务来验证它们,但由于代理配置,它无法访问该服务。

由于调用urlopen的代码可能在django-social-auth中,因此您可能不希望直接修改该代码以使用代理。您可以尝试设置http_proxy环境变量(详情请参阅this answer),以使全部为 urllib请求通过代理),或者禁用您的Web服务器的代理身份验证。

相关问题