Skip to content

Commit af8c162

Browse files
bluesliverxsaville
and
saville
authored
Make sure token does not expire within 10 seconds instead of 2 (#268)
Co-authored-by: saville <[email protected]>
1 parent 8dfe406 commit af8c162

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/datapipe/jenkins/vault/credentials/AbstractVaultTokenCredentialWithExpiration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ private boolean tokenExpired() {
6262
boolean result = true;
6363
Calendar now = Calendar.getInstance();
6464
long timeDiffInMillis = now.getTimeInMillis() - tokenExpiry.getTimeInMillis();
65-
if (timeDiffInMillis < -2000L) {
66-
// token will be valid for at least another 2s
65+
if (timeDiffInMillis < -10000L) {
66+
// token will be valid for at least another 10s
6767
result = false;
6868
LOGGER.log(Level.FINE, "Auth token is still valid");
6969
} else {

0 commit comments

Comments
 (0)