A client opens a proposal link four seconds early and sees "This link has expired". Another forwards a link from last year's project and it still resolves to a document that mentions a price you no longer charge.
Both are the same bug: the link had no opinion about time, or its opinion was checked against the wrong clock.
A share link makes three claims β which document , what the holder may do , until when β and only the third one gets tested by reality, usually in front of a client. Here is a design that survives forwarding, revocation and a server whose clock drifts.
Start with what the token has to say
Keep the payload small and boring. A version, the subject, the scope, the issuer's timestamps, and a nonce:
{ "v" : 1 , "doc" : "9f1c2a4e-..." , "scope" : "view" , "iss" : "revercue.co.uk" , "iat" : 1795948800 , "exp" : 1797158400 , "jti" : "7d2f9c1e" }
Enter fullscreen mode
Exit fullscreen mode
Six fields do the work:
scope β view , comment or sign .β¦