我需要提供功能来重置我们的asp.net网站上的用户密码。考虑到我必须遵循的要求,我可以/应该采取什么方法来更改密码?
要完成此操作,用户必须提供他们注册的电子邮件地址,并且功能应重置已忘记的密码,这很容易。
棘手的部分是考虑到网站的会员模型(不使用标准的AspnetMembershipProviders),网站使用自己的系统来处理用户。
约我已经提供了和我必须遵循的要求,这是这个问题的支点:
1) User can enter email address to reset password
2) the password that is sent to the email address provided
3) the temporary password must be valid for no more than 24 hours
4) the email will provide the link to allow them to enter the temporary password
5) when they log in they must be prompted to reset to a permanent password
6) the temporary password must be single use
对于点3.同事使用SQL作业自动化的时间限制,但建议我不完全确定这将如何工作,或者如果这是最好的方法。
对于第6点,我正在考虑在登录时使用触发器来使临时密码无效,这样如果他们再次尝试,他们将不得不再次通过整个过程。
3和6是我想要的想法的部分,当解释你的答案时,你可以试着说明为什么应该使用规定的方法来完成,所以我可以更好地判断哪个答案最符合我的要求。
谢谢 - 这样一个简单的方法来实现它,没有批次。 – 2010-11-21 17:01:58