Use BasicAuthInterceptor instead. Note that BasicAuthInterceptor class is a HAPI client interceptor instead of being a commons-httpclient interceptor, so you register it to your client instance once it's created using IGenericClient#registerInterceptor(IClientInterceptor) or IBasicClient#registerInterceptor(IClientInterceptor) instead

Use LoggingInterceptor as a client interceptor registered to your
client instead, as this provides much more fine-grained control over what is logged. This
method will be removed at some point (deprecated in HAPI 1.6 - 2016-06-16)