1
I’m generating an alphanumeric token that way:
SecureRandom secureRandom = new SecureRandom();
long longToken = Math.abs(secureRandom.nextLong());
String random = Long.toString(longToken, 16);
I need a mechanism that defines the lifetime of this token, so that it is not used more than once (Example: Something in the sense of the JWT timeout). Does anyone have any idea how to do that?