MongoDB is a scalable, high-performance, open source NoSQL database.
It offers Ad hoc queries, Indexing, Replication, Load balancing, File storage (GridFS), Aggregation,
This requires the library mongo-2.8.0.jar to be present in the classpath.
The following example shows how to authenticate a user in MongoDB.
//Connect to mongoDB with given IP and PORT
Mongo mongo = new Mongo("localhost", 27017);
//Get the database object
DB database = mongo.getDB("mytestdb");
//Authenticates the user against the given database
//Return true if authenticated, false otherwise boolean authFlag = database.authenticate("user1", "mypassword1".toCharArray());
System.out.println("authFlag : " + authFlag);