mongodb - 在 Haskell 中授权连接到 mongoDB

标签 mongodb haskell

如何向 mongoDB 进行身份验证?

我正在使用这个驱动程序 http://hackage.haskell.org/package/mongoDB

我在文档或源代码中找不到任何相关内容。

最佳答案

查看 auth功能。来自文档:

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.

关于mongodb - 在 Haskell 中授权连接到 mongoDB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14893001/

相关文章:

python - MongoDB:无法启动副本集; 'has data already, cannot initiate set'

haskell - 在 Haskell 中提升类实例

haskell - 如何干净地定义包含具有公共(public)变量参数的函数的 Haskell 模块?

haskell - 为什么 GHC 对于 `IO b` 的应用程序推断类型为 `hSetBuffering` ?

c++ - 在 Windows 上安装 MongoDB C++ 驱动程序。

mongodb - GNU AGPL v3.0(MongoDB)将在商业产品上发布

mongodb - Mongoose {$exists : false} not working, 为什么?

haskell - 为什么在两个相似的函数定义中类型推断与 as-pattern 的差异?

list - Haskell - 我如何迭代和比较?

node.js - 无法使用 MEAN 堆栈连接到 Mongodb.atlas 集群