Asp.net 半身份验证用户?
我们有一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否希望您的用户在第一次会话后返回并能够被识别?您能做的最好的事情就是将内容存储在客户端 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.
查看个人资料。
应该与匿名用户一起使用 - 根据这个问题 。
Look at Profiles.
Should work with anonymous users - as per this question.