code: private boolean needsNewSession() {
          if (sessionCredentials == null) return true;
  
          long timeRemaining = sessionCredentialsExpiration.getTime() - System.currentTimeMillis();
          return timeRemaining < (this.refreshThreshold * 1000);
      }
docs: Returns true if a new STS session needs to be started. A new STS session
  is needed when no session has been started yet, or if the last session is
  within the configured refresh threshold.
  
  @return True if a new STS session needs to be started.