This should be moved into the HttpAuthAdapter factory.