ASP.NET Identity 2.0电子邮件链接过期 [英] ASP.NET Identity 2.0 Email link expire
本文介绍了ASP.NET Identity 2.0电子邮件链接过期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我使用的是创建新应用程序时生成的相同代码。它工作正常。但我希望在注册后获得的电子邮件链接到期。我在Identiry.config文件中添加代码如下:
Hello,
I am using the same code which is generate when create the new application. It is working fine. But i want to expire the email link which are getting after register. I add the code in Identiry.config file as below:
manager.UserTokenProvider =
new DataProtectorTokenProvider<ApplicationUser>(dataProtectionProvider.Create("ASP.NET Identity"))
{
TokenLifespan = TimeSpan.FromHours(72)
};
现在可以帮助我如何在控制器方法中检查这个到期时间。
谢谢
Now can any one help me how to check this expiration in controller method.
Thanks
推荐答案
http://www.asp.net/identity/overview/features-api/two-factor-authentication-using-sms-and-email-with-aspnet-identity [< a href =http://www.asp.net/identity/overview/features-api/two-fact or-authentication-using-sms-and-email-with-aspnet-identitytarget =_ blanktitle =New Window> ^ ]可以帮助你。
这篇关于ASP.NET Identity 2.0电子邮件链接过期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文