public static MongoCredential createCredential ( final String userName , final String database , final char [ ] password ) { return new MongoCredential ( null , userName , database , password ) ; }
Creates a MongoCredential instance with an unspecified mechanism . The client will negotiate the best mechanism based on the version of the server that the client is authenticating to .