With the introduction of the new 3.x drivers mongodb team introduced new methods for good reasons. This includes db authentication too. If you are writing a new application it is always better to use the latest apis. Also, it is always good to upgrade for the latest api for the sake of maintainability. Lot's of articles explain how to connect to mongo db with java driver with deprecared methods