I've been thinking about how to implement time-dependent confirmation
tokens without saving state. It seems that you can get a reasonable
approximation by adding in the date string to the token. When the
corresponding auth command is received, use not only today's date in the
token, but also check yesterday, the day before, etc. (configurable, I
suppose) until a match is found (or not).
The problem: how do you get the date string (i.e. Mon04Nov1996) for
yesterday? I would use the DateCalc module, but I suppose you could
subtract a day's worth of seconds from &localtime and use that in a call to
&ctime. Somebody would probably yell about leap seconds, though.
Any ideas? Is this a useful feature? Anyone want to write it besides me?
- J<
Follow-Ups:
|
|