This question shows research effort; it is useful and clear
2
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
我正在编写一个 pylons 应用程序,并且我正在使用 authkit 进行身份验证/授权。如果用户未登录并点击需要授权的页面,authkit 会吞下 401(未经过身份验证)响应并重定向到登录页面。这对于 Web 界面非常有用,但对于我们的 Web 服务来说不是很好。当未经身份验证的用户使用受保护的 Web 服务时,我们希望将响应的状态设置为 401。