in src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleRequestMojo.java [279:288]
public void process(HttpRequest request, EntityDetails entity, HttpContext context) throws HttpException, IOException {
if (!(context instanceof HttpClientContext)) {
throw new IllegalStateException("This interceptor only supports HttpClientContext but context is of type " + context.getClass());
}
HttpClientContext httpClientContext = (HttpClientContext)context;
log.debug("Adding preemptive authentication to request for target host " + targetHost);
// as the AuthExchange object is already retrieved by the client when the interceptor kicks in, it needs to modify the existing object
httpClientContext.getAuthExchange(targetHost).select(basicAuth);
}