2
Answers

regenerate password in 3 tier architecture using database

hi friends,,

i am developing one web site  in this i have one problem that is if i forget my password the system will regenerate password and that password will send to my mail id,and that will be updates in database also please do any one in 3-tier architecture please...


if i click forget password field, that will generate one email text field in that i will enter my email id and click on generate button and new password will be generated and again that will be send to email and   that will be updated in database also..in database only two fields have,one is username and password...so the password field will be updated...

how please do any one ,,,in 3-tier
Answers (2)
0
bhanu prasannakumar

bhanu prasannakumar

NA 126 125.7k 13y
please give me the code for this one
0
Pradeep Chandraker

Pradeep Chandraker

NA 4k 650.4k 13y

If your 3-tire architecture is something like UI - Service - Database. Where UI talks to service and service talks to database, you may follow below steps:

1. Have forgot password method in your service.
2. Generate new password on your forgot password method and save it in database (you may have some encryption logic for password).
3. If new password is saved successfully on database, return new password to your UI calling method (you may still have password encrypted as it is traveling between service call).
4. Once you have new password returned from service (forgot password) call, email it to end user (if password was encrypted you may decrypt it before sending email).

Let me know if you have any question on this.