Commit 0480d03e authored by Matija Obreza's avatar Matija Obreza
Browse files

Extended verification token validity to 12 days

parent 802fdc59
......@@ -37,7 +37,7 @@ public class TokenVerificationServiceImpl implements TokenVerificationService, J
private static final Logger LOG = LoggerFactory.getLogger(TokenVerificationServiceImpl.class);
private static final int HOURS_UNTIL_INVALID = 48;
private static final int TOKEN_VALIDITY_HOURS = 24 * 12; // 12 days
@Autowired
private VerificationTokenRepository verificationTokenRepository;
......@@ -52,7 +52,7 @@ public class TokenVerificationServiceImpl implements TokenVerificationService, J
token.setKey(RandomStringUtils.randomAlphanumeric(4).toUpperCase());
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.HOUR_OF_DAY, HOURS_UNTIL_INVALID);
calendar.add(Calendar.HOUR_OF_DAY, TOKEN_VALIDITY_HOURS);
Date validUntil = calendar.getTime();
token.setValidUntil(validUntil);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment