From 53fe82d117170dc29f120d15774712d70d87d403 Mon Sep 17 00:00:00 2001 From: "Scott R. Parish" Date: Sat, 6 Feb 2010 15:57:15 -0600 Subject: [PATCH] create auth alias to be consistent with mongo JS api --- Database/MongoDB.hs | 5 ++++- TODO | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Database/MongoDB.hs b/Database/MongoDB.hs index b3ba8e4..6049887 100644 --- a/Database/MongoDB.hs +++ b/Database/MongoDB.hs @@ -36,7 +36,7 @@ module Database.MongoDB ColCreateOpt(..), collectionNames, createCollection, dropCollection, renameCollection, runCommand, validateCollection, - login, addUser, + authenticate, login, addUser, -- * Collection Collection, FieldSelector, FullCollection, NumToSkip, NumToReturn, Selector, @@ -564,6 +564,9 @@ login c db user pass = do ("key", toBson digest)] in runCommand c db request +authenticate :: Connection -> Database -> Username -> Password -> IO BsonDoc +authenticate = login + -- | create a new user in the current /Database/ addUser :: Connection -> Database -> Username -> Password -> IO BsonDoc addUser c db user pass = do diff --git a/TODO b/TODO index 11ba236..a28f0b2 100644 --- a/TODO +++ b/TODO @@ -15,7 +15,6 @@ BSON MongoDB ------- + support full level 0 - - database command support ?? - handle query errors - hint, explain, $where - database profiling: set/get profiling level, get profiling info @@ -24,7 +23,6 @@ MongoDB * getName * getCollection * add_son_manipulators - * authenticate * dereference (dbref) * error * eval