logout
This commit is contained in:
parent
53fe82d117
commit
b3581b5209
2 changed files with 7 additions and 4 deletions
|
@ -36,7 +36,7 @@ module Database.MongoDB
|
||||||
ColCreateOpt(..),
|
ColCreateOpt(..),
|
||||||
collectionNames, createCollection, dropCollection,
|
collectionNames, createCollection, dropCollection,
|
||||||
renameCollection, runCommand, validateCollection,
|
renameCollection, runCommand, validateCollection,
|
||||||
authenticate, login, addUser,
|
auth, addUser, login, logout,
|
||||||
-- * Collection
|
-- * Collection
|
||||||
Collection, FieldSelector, FullCollection,
|
Collection, FieldSelector, FullCollection,
|
||||||
NumToSkip, NumToReturn, Selector,
|
NumToSkip, NumToReturn, Selector,
|
||||||
|
@ -564,8 +564,12 @@ 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
|
auth :: Connection -> Database -> Username -> Password -> IO BsonDoc
|
||||||
authenticate = login
|
auth = login
|
||||||
|
|
||||||
|
logout :: Connection -> Database -> IO ()
|
||||||
|
logout c db =
|
||||||
|
runCommand c db (toBsonDoc [(s2L "logout", BsonInt32 1)]) >> return ()
|
||||||
|
|
||||||
-- | 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
|
||||||
|
|
1
TODO
1
TODO
|
@ -29,7 +29,6 @@ MongoDB
|
||||||
* last_status
|
* last_status
|
||||||
* logout
|
* logout
|
||||||
* reset_error_history
|
* reset_error_history
|
||||||
* eval
|
|
||||||
- database admin
|
- database admin
|
||||||
* getAdmin
|
* getAdmin
|
||||||
* getProfilingLevel
|
* getProfilingLevel
|
||||||
|
|
Loading…
Reference in a new issue