简体   繁体   English

使用 JWT 身份验证的 MongoDB Atlas 和 Realms (C#/.NET)

[英]MongoDB Atlas & Realms with JWT Authentication (C# / .NET)

I've set up a Database Cluster with MongoDB/Atlas.我已经用 MongoDB/Atlas 设置了一个数据库集群。 As authentication method, I want to use a JWT based solution.作为身份验证方法,我想使用基于 JWT 的解决方案。 While Atlas doesn't support JWT authentication, MongoDB Realms does.虽然 Atlas 不支持 JWT 身份验证,但 MongoDB Realms 支持。 So I added a new Realm app, connected it to my Database Cluster and activated JWT authentication.所以我添加了一个新的 Realm 应用程序,将它连接到我的数据库集群并激活 JWT 身份验证。

Now I can't find a way to use Realms from my .NET Core application.现在我找不到从我的 .NET Core 应用程序中使用 Realms 的方法。 The MongoDB C# drivers only seem to work when using atlas but not realms. MongoDB C# 驱动程序似乎只在使用 atlas 而不是领域时工作。 There is a Realms nuget-package but I don't know how to connect to MongoDB Realms.有一个 Realms nuget-package,但我不知道如何连接到 MongoDB Realms。

Is there a way to user Atlas & Realms along with JWT authentication in a .NET Core app?有没有办法在 .NET Core 应用程序中使用 Atlas & Realms 以及 JWT 身份验证?

Thanks for your help.谢谢你的帮助。

Realm .NET SDK 的测试版于 2020 年 10 月发布,允许您连接到 MongoDB Realm 并使用所有支持的身份验证类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM