code: @VisibleForTesting
    HeaderCacheElement getHeaderUnsafe(long timeout, TimeUnit timeUnit) {
      // Optimize for the common case: do a volatile read to peek for a Good cache value
      HeaderCacheElement headerCacheUnsync = this.headerCache;
  
      // TODO(igorbernstein2): figure out how to make this work with appengine request scoped threads
      switch (headerCacheUnsync.getCacheState()) {
        case Good:
          return headerCacheUnsync;
        case Stale:
          asyncRefresh();
          return headerCacheUnsync;
        case Expired:
        case Exception:
          // defer the future resolution (asyncRefresh will spin up a thread that will try to acquire the lock)
          return syncRefresh(timeout, timeUnit);
        default:
          String message = "Could not process state: " + headerCacheUnsync.getCacheState();
          LOG.warn(message);
          return new HeaderCacheElement(
              Status.UNAUTHENTICATED
                  .withCause(new IllegalStateException(message)));
      }
    }
docs: Get the http credential header we need from a new oauth2 AccessToken.