Rack::Auth::基本销毁会话(注销)
我使用 Rack::Auth::Basic 进行授权,它有效,但我需要能够销毁用户会话并让他重新登录或注销。它是如何制作的?
I made authorization using Rack::Auth::Basic, it works, but I need to be able to destroy user session and let him re-login or log out. How it can be made?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您好,抱歉这么晚才回复您,我刚刚看到您的帖子,也许它仍然可以帮助您:
此代码取自 Sunstone 应用程序,该应用程序是 OpenNebula 的一部分
http://opennebula.org/
Hello sorry for the late response I just saw your post, maybe it still could help you:
This code was take from the Sunstone application which is part of OpenNebula
http://opennebula.org/
没有与 HTTP 基本身份验证关联的会话,如果您想将身份验证与会话链接起来,您必须在应用程序级别执行此操作,这听起来像 Rack 中间件一样很难。
There is no session associated with HTTP Basic Authentication, if you want to link authentication with a session you'll have to do it at application level, sounds hard as a Rack middleware.