You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return false, fmt.Errorf("failed to refresh token: %w", err)
52
-
}
53
-
}
54
-
55
-
if time.Until(c.Expiry) < c.config.TokenRefreshBufferPeriod {
56
-
return false, fmt.Errorf("token lifetime setting less than buffer. Buffer setting: %v, Time (seconds) until Exp: %v", c.config.TokenRefreshBufferPeriod, time.Until(c.Expiry))
57
-
}
58
-
return true, nil
59
-
}
60
-
*/
61
-
62
-
// ValidAuthTokenCheck checks if the current token is valid and not close to expiry.
63
-
// If the token is invalid, it tries to refresh it.
64
-
// It returns a boolean indicating the validity of the token and an error if there's a failure.
err:=fmt.Errorf("token lifetime setting less than buffer. Buffer setting: %v, Time (seconds) until Exp: %v", c.config.TokenRefreshBufferPeriod, time.Until(c.Expiry))
106
-
c.logger.Error("Token lifetime less than buffer", zap.Duration("buffer_period", c.config.TokenRefreshBufferPeriod), zap.Duration("time_until_expiry", time.Until(c.Expiry)), zap.Error(err))
0 commit comments