0

我们正在使用带有表单身份验证的 DNN 6.2,我们有一个要求,例如我们需要使用外部 cookie 而不是表单身份验证 cookie 进行身份验证。但是所有现有用户及其个人资料都已在 DNN 中可用。

请分享任何输入。

4

1 回答 1

0

您需要复制现有的一个新的登录模块,并在登录事件的顶部检查 cookie 并执行FormsAuthentication.SetAuthenticationCookie(username),您就完成了!

您需要重新考虑安全性并确保您想要这样做。除了使用 cookie,您还可以在必须执行以下操作的地方进行 url 登录:生成类似 /yourpage.aspx?user={bacd}&signature={hashcode of secret+username} 的 url

在 yourpage.aspx 中,您需要使用 secret+username 重新生成签名并匹配它,如果匹配,只需执行FormsAuthentication.SetAuthenticationCookie(username)并重定向到适当的页面。

希望这可以帮助。

于 2014-02-06T04:49:55.690 回答