create auth alias to be consistent with mongo JS api
This commit is contained in:
parent
92f37cc946
commit
53fe82d117
2 changed files with 4 additions and 3 deletions
|
@ -36,7 +36,7 @@ module Database.MongoDB
|
||||||
ColCreateOpt(..),
|
ColCreateOpt(..),
|
||||||
collectionNames, createCollection, dropCollection,
|
collectionNames, createCollection, dropCollection,
|
||||||
renameCollection, runCommand, validateCollection,
|
renameCollection, runCommand, validateCollection,
|
||||||
login, addUser,
|
authenticate, login, addUser,
|
||||||
-- * Collection
|
-- * Collection
|
||||||
Collection, FieldSelector, FullCollection,
|
Collection, FieldSelector, FullCollection,
|
||||||
NumToSkip, NumToReturn, Selector,
|
NumToSkip, NumToReturn, Selector,
|
||||||
|
@ -564,6 +564,9 @@ login c db user pass = do
|
||||||
("key", toBson digest)]
|
("key", toBson digest)]
|
||||||
in runCommand c db request
|
in runCommand c db request
|
||||||
|
|
||||||
|
authenticate :: Connection -> Database -> Username -> Password -> IO BsonDoc
|
||||||
|
authenticate = login
|
||||||
|
|
||||||
-- | create a new user in the current /Database/
|
-- | create a new user in the current /Database/
|
||||||
addUser :: Connection -> Database -> Username -> Password -> IO BsonDoc
|
addUser :: Connection -> Database -> Username -> Password -> IO BsonDoc
|
||||||
addUser c db user pass = do
|
addUser c db user pass = do
|
||||||
|
|
2
TODO
2
TODO
|
@ -15,7 +15,6 @@ BSON
|
||||||
MongoDB
|
MongoDB
|
||||||
-------
|
-------
|
||||||
+ support full level 0
|
+ support full level 0
|
||||||
- database command support ??
|
|
||||||
- handle query errors
|
- handle query errors
|
||||||
- hint, explain, $where
|
- hint, explain, $where
|
||||||
- database profiling: set/get profiling level, get profiling info
|
- database profiling: set/get profiling level, get profiling info
|
||||||
|
@ -24,7 +23,6 @@ MongoDB
|
||||||
* getName
|
* getName
|
||||||
* getCollection
|
* getCollection
|
||||||
* add_son_manipulators
|
* add_son_manipulators
|
||||||
* authenticate
|
|
||||||
* dereference (dbref)
|
* dereference (dbref)
|
||||||
* error
|
* error
|
||||||
* eval
|
* eval
|
||||||
|
|
Loading…
Reference in a new issue