> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> We send him a http://blah.org/resetpwd.jsp?xdksdfksdfsdf URL with
> the key attached to the URL. The key expires in 24 hours. The 
> user checks on this link in his email. We need to verify if the key is

> still valid and then allow him to change the password. 
> I am not sure how to generate these random keys. 
> Also let me know if there is an efficient way to check the
> time stamps for these keys.

Not really Struts related... It's fairly easy to generate random numbers
in Java, so you could take a random number and "convert" it into
letters.  You could look at the Tomcat source code that generates the
jsessionid and use that.  Not sure what you mean by checking the date
stamp... When you issue this key, you have to put it somewhere, which
could be a HashMap in Application scope, or in a database.  Wherever you
put it, store the datestamp nearby and check it when you read the
record.  If it's too old, throw an exception.  Just off the top of my
head...

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to