Description Usage Arguments Details See Also Examples
Autherticate a user and password against a given database on a MongoDB server.
1  | mongo.authenticate(mongo, username, password, db = "admin")
 | 
mongo | 
 (mongo) a mongo connection object.  | 
username | 
 (string) username to authenticate.  | 
password | 
 (string) password corresponding to username.  | 
db | 
 (string) The database on the server against which to validate the username and password.  | 
See http://www.mongodb.org/display/DOCS/Security+and+Authentication.
Note that mongo.create() can authenticate a username and
password before returning a connected mongo object.
1 2 3  | mongo <- mongo.create()
if (mongo.is.connected(mongo))
    mongo.authenticate(mongo, "Joe", "ZxYaBc217")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.