我正在登录以在 mongodb 缝合客户端上进行搜索。但在 AnonymousCredential 身份验证之后,它什么也不做。
kt代码:
val mongoClient = client!!.getServiceClient(RemoteMongoClient.factory, "mongodb-atlas")
client!!.auth
.loginWithCredential(AnonymousCredential())
.continueWith{ task -> { ...some code... } }
但它永远不会到达“一些代码”部分。而且我不知道为什么在缝合 UI 日志中我得到 OK 状态:
{
"arguments": [
{
"database": "test",
"collection": "users",
"query": {
"id": ""
},
"limit": {
"$numberInt": "1"
},
"project": null,
"sort": null
}
],
"name": "find",
"service": "mongodb-atlas"
}
Function Call Location: US-VA
Compute Used: 624980924 bytes•ms
Remote IP Address: 201.124.215.137
SDK: android v0.0
Platform Version: 8.1.0
Rule Performance Metrics:
{
"test.users": {
"roles": {
"default": {
"matching_documents": 1,
"evaluated_fields": 0,
"discarded_fields": 0
}
},
"no_matching_role": 0
}
}