没有ASP.NET身份的电子邮件确认和密码策略

[英]Email confirmation and Password Policy Without ASP.NET Identity


I am using OWIN form authentication in my project and not using any Identity specific classes that MVC templates generate.

我在我的项目中使用OWIN表单身份验证,而不使用MVC模板生成的任何Identity特定类。

I want to implement email confirmation and a password policy in my project. I'm not sure how this can be accomplished, as I don't have Identity related classes in my project as I don't want to use those. I am happy with the OWIN form authentication.

我想在我的项目中实现电子邮件确认和密码策略。我不确定如何实现这一点,因为我在项目中没有与身份相关的类,因为我不想使用它们。我对OWIN表单身份验证感到满意。

Is there any way I can verify via email and create a password policy by using OWIN form authentication?

有什么办法可以通过电子邮件验证并使用OWIN表单身份验证创建密码策略吗?

1 个解决方案

#1


1  

I am not expert but Yes you can , To verify Email address you can send email with Guid as QueryString and add page to check id Guid is true and then flag user as confirmed did you mean like this ?

我不是专家但是你可以,要验证电子邮件地址你可以用Guid作为QueryString发送电子邮件并添加页面来检查ID Guid是真的然后标记用户确认你的意思是这样吗?

     Send Email as html :
    body = "<b>Wellcom Mr " + Username + " </b>";
     body += "<br />";
     body += "<b><a href=http://YourDomain/checkuseremail.aspx?       
    UserId=" + userId + " style='display:block; '>confirm</a></b>";


     public partial class checkuseremail: System.Web.UI.Page
    {
   protected void Page_Load(object sender, EventArgs e)
    {
    string id = Request.QueryString["UserID"];
     if(id != null){ select user id if email correct redirct to success page  and flag user as confirmed} 

      else {redirct to error page}
     }}

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.itdaan.com/blog/2016/04/19/df025b46ec8b2b9f4edfe048ffc355c6.html



 
© 2014-2018 ITdaan.com 粤ICP备14056181号