driver-core/src/main/com/mongodb/MongoCredential.java
public static MongoCredential createPlainCredential(final String userName, final String source, final char[] password) {
        return new MongoCredential(PLAIN, userName, source, password);
    }
public static MongoCredential createPlainCredential(final String userName, final String source, final char[] password) {
        return new MongoCredential(PLAIN, userName, source, password);
    }
Creates a MongoCredential instance for the PLAIN SASL mechanism.

@param userName the non-null user name
@param source   the source where the user is defined.  This can be either {@code "$external"} or the name of a database.
@param password the non-null user password
@return the credential

@since 2.12
@mongodb.server.release 2.6
@mongodb.driver.manual core/authentication/#ldap-proxy-authority-authentication PLAIN