code: private Pair<Request, HttpMessageSecurity> buildAuthenticatedRequest(Request originalRequest, Response response)
              throws IOException {
          String authenticateHeader = response.header(WWW_AUTHENTICATE);
  
          Map<String, String> challengeMap = extractChallenge(authenticateHeader, BEARER_TOKEP_REFIX);
  
          challengeMap.put("x-ms-message-encryption-key", response.header("x-ms-message-encryption-key"));
          challengeMap.put("x-ms-message-signing-key", response.header("x-ms-message-signing-key"));
  
          // Cache the challenge
          cache.addCachedChallenge(originalRequest.url(), challengeMap);
  
          return buildAuthenticatedRequest(originalRequest, challengeMap);
      }
docs: Builds request with authenticated header. Protects request body if supported.
  
  @param originalRequest
  unprotected request without auth token.
  @param response
  response with unauthorized return code.
  @return Pair of protected request and HttpMessageSecurity used for
  encryption.