使用 ASP.NET 表单身份验证进行用户模拟
场景:在电子商务系统中,帮助台用户应该能够“模拟”或“作为”特定客户(从基于 Web 的管理站点)“登录”,以便他可以支持第一手客户 - 例如。 当客户打电话时。
附加说明:无需跟踪原始身份验证上下文。 我们只需要提供一个“登录身份”按钮,该按钮将以客户身份登录,而无需帮助台用户知道密码。
有什么想法可以使用常规 ASP.NET 表单身份验证来实现此场景吗?
Scenario: In an e-commerce system, a helpdesk user should be able to "impersonate" or "log on as" a specific customer (from the web-based administration site) so that he can support the customer first-hand - eg. when the Customer is on the phone.
Additional clarification: There is no need to keep track of the original authentication context. We simply need to provide a "Log on as" button that will log on as the customer without the helpdesk user needing to know the password.
Any ideas how this scenario could be implemented using regular ASP.NET Forms Authentication?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许我不太明白这个场景。 但为什么不让支持人员以用户身份登录呢?
然后,电子商务系统将需要更新“购物车”或其他任何内容,以便支持可以提供帮助。
Maybee I don't understand the scenario exactly. But why not let the support login as the user?
Then it will be up to the e-commerce system to have an updated "cart" or whatever so the support can help..
我能够让它工作,假设您已经有一个用户登录,您可以使用下面的代码模拟另一个用户。
I was able to get this to work, assuming you've got a user already logged in, you can impersonate another user with the below code.