我需要提供功能來重置我們的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