code: public void intercept(HttpRequest request) throws IOException {
      lock.lock();
      try {
        Long expiresIn = getExpiresInSeconds();
        // check if token will expire in a minute
        if (accessToken == null || expiresIn != null && expiresIn <= 60) {
          refreshToken();
          if (accessToken == null) {
            // nothing we can do without an access token
            return;
          }
        }
        method.intercept(request, accessToken);
      } finally {
        lock.unlock();
      }
    }
docs: {@inheritDoc}
  <p>
  Default implementation is to try to refresh the access token if there is no access token or if
  we are 1 minute away from expiration. If token server is unavailable, it will try to use the
  access token even if has expired. If a 4xx error is encountered while refreshing the token,
  {@link TokenResponseException} is thrown. If successful, it will call {@link #getMethod()} and
  {@link AccessMethod#intercept}.
  </p>
  
  <p>
  Subclasses may override.
  </p>