johnny-john
johnny-john

Reputation: 854

Authorized connection to mongoDB in Haskell

How to authenticate to mongoDB?

I am using this driver http://hackage.haskell.org/package/mongoDB

I can't find anything related in the docs or source.

Upvotes: 4

Views: 613

Answers (1)

Yuras
Yuras

Reputation: 13876

Check out the auth function. From the docs:

auth :: MonadIO' m => Username -> Password -> Action m Bool

Authenticate with the current database (if server is running in secure mode). Return whether authentication was successful or not. Reauthentication is required for every new pipe.

Upvotes: 5

Related Questions