Asp.net 半身份验证用户?

发布于 2024-08-06 04:48:51 字数 210 浏览 3 评论 0原文

我们有一个 asp.net mvc 网站,目前处于内测状态。因此,我们将发送邀请码,必须在注册过程中提供这些邀请码才能成功注册。我们希望降低进入门槛,以便用户只需提供代码即可获得访问权限,而无需经历更费力的注册过程。我们确实启用了匿名身份验证,因此,我假设这些用户将保持匿名。

是否有可能以某种方式区分普通的匿名用户和提供正确代码的用户?例如,可以将匿名用户添加到角色中吗?还有其他建议吗?

We've got an asp.net mvc website that is currently in a private beta state. As such we are sending out invite codes that must be supplied as part of the registration process for registration to succeed. We'd like to reduce the bar of entry such that users only have to supply the code to gain access rather than going through a more laborious registration process. We do have anonymousIdentification enabled, and as such, I assume that these users would remain anonymous.

Is it possible to somehow differentiate between a plain-old anonymous user and one that has supplied the correct code? For instance, can anonymous users be added to a role? Any other suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

许久 2024-08-13 04:48:51

您是否希望您的用户在第一次会话后返回并能够被识别?您能做的最好的事情就是将内容存储在客户端 cookie 中。如果这些被破坏,用户在(重新)访问您的网站时需要重新建立自己。或者你要求他们重新输入验证码,然后可以与其他人共享——这并不是一个真正的选择。

我完全理解较低标准的要求。我建议您的帐户设置尽可能简单且简单——例如电子邮件+密码。使用邀请码来限制对帐户页面的访问,然后在使用该代码后将其从列表中标记出来(将新的 userId 映射到邀请码。)

您将在帐户注册过程中取得领先(完美 )对于 beta 测试人员)并且不必创建完全是一次性的东西。

Are you expecting your users to return beyond the first session and be identifiable? The best you can do is store things in a client-side cookie. If those are nuked, the user needs to re-establish themselves when (re)visiting your site. OR you're asking them to re-enter their validation code, which could then be shared with others -- not really an option.

I totally get the lower-the-bar requirement. I would suggest making your account setup minimal and easy -- email + password, for example. Use the invitation code to restrict access to the account page, then mark it off the list when the code has been used (map the new userId to the invitation code.)

You'll get a head-start on your account signup process (perfect for beta testers) and won't have to create something that's entirely a throwaway.

困倦 2024-08-13 04:48:51

查看个人资料

应该与匿名用户一起使用 - 根据这个问题

Look at Profiles.

Should work with anonymous users - as per this question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文