• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Temporary dynamic links?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The basic problem is a reset password functionality for one-way password encryption. The desired functionality would be to send the user a unique link that leads him to a page where he can type in a new password. But the link should expire after a certain time (such as 48 hours). It also should of course work once to reset the password with this link.

Can anybody give me any pointers where to start even on the issue of pages/links that expire after a certain time after creation? I've tried googling it, but I'm not getting anywhere. Is there a specific term for this concept that I could look for? Any books that might cover an issue like this? Or is there no way to do it other than track the creation and destruction of pages like that through database+scheduling framework?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could include a hash of the username and timestamp in the URL, and store that in the DB along with that username and timestamp, and a flag whether or not it's been accessed already.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amazon's S3 (Simple Storage Service) has an option for short-lived URLs and has code available which you could study.

I used it in some examples here.

Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic