We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 163e5c6 commit 03b50feCopy full SHA for 03b50fe
Database/MongoDB/Query.hs
@@ -276,10 +276,10 @@ auth un pw = do
276
mmv <- readMaybe . T.unpack . head . T.splitOn "." <$> serverVersion
277
maybe (return False) performAuth mmv
278
where
279
- performAuth majorVersion =
280
- if majorVersion >= (3 :: Int)
281
- then authSCRAMSHA1 un pw
282
- else authMongoCR un pw
+ performAuth majorVersion
+ | majorVersion >= (4 :: Int) = authSCRAMSHA256 un pw
+ | majorVersion >= 3 = authSCRAMSHA1 un pw
+ | otherwise = authMongoCR un pw
283
284
authMongoCR :: (MonadIO m) => Username -> Password -> Action m Bool
285
-- ^ Authenticate with the current database, using the MongoDB-CR authentication mechanism (default in MongoDB server < 3.0)
0 commit comments