Saturday, May 18th

Last update12:59:56 AM GMT

Font Size

Cpanel
Add Announcement Here

simulate one-time link with token expiration

simulate one-time link with token expiration

I'm looking for a very basic way to generate something similar to the one-time password recovery link, but for a different application. Currently, I have a rule config'd so that when I add a particular role to a user, a notification is dispatched to the user with a link that allows them to create a new content-type on the site. The problem is that I don't want this static link to be lingering out there for users to be able to pass around and keep regenerating said content-types. I want this link to contain some sort of token that will expire within, say, 24 hrs. It doesn't have to be incredibly elaborate. It's mostly a deterrent to prevent the static link from being abused. I was thinking I could set some kind of server-side cookie that expires in 24 hrs, which would contain a random generated string. Then I could just do something like http://www.mysite.com/?q=path-to-create … amp;token=[some-random-value-that-expires], but I don't even know where to start.

Any help is much appreciated!

Guest
Guest
useravatar
Offline
Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
5886
Total Polls:
0
Total Posts:
41
Dormant:
User Info:
 
Total Users:
2
Newest User:
sarayoot
Members Online:
0
Guests Online:
6

Most Active Users: 
sarayoot, admin
Online: 
There are no members online

Forum Legend:

 Topic
 ใหม่
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked
You are here Support Post installation simulate one-time link with token expiration