Reputation: 231
Does anyone have an example of how to authenticate to a mongodb 2.5 server (soon to be 2.6) with LDAP authentication using the Java driver?
Upvotes: 0
Views: 1175
Reputation: 3813
You can find an example in the Java driver source here. Typically, you would use "$external" as the value of the source parameter to the com.mongodb.MongoCredential#createPlainCredential method, as in the shell example in the 2.6 Release Notes.
Note also that since the password is sent as plain test over a network, you should plan to configure your driver and MongoDB cluster to use SSL connections.
Upvotes: 3