1

我正在尝试使用 ServiceStack 框架的源代码来真正掌握身份验证的工作原理,而不是遵循源代码。

我首先克隆了 ServiceStack 的主代表并将 ServiceInterface 的 csproj 添加到我的解决方案中。然后我删除了 ServiceStack.ServiceInterface dll 并添加了本地项目。由于依赖关系,我还在我的解决方案中添加了以下项目:ServiceStack、ServiceStack.Common、ServiceStack.Interfaces、ServiceStack.OrmLite 和 ServiceStack.OrmLite。

如果我添加插件 AuthFeature 我收到以下错误:

System.MissingMethodException: Method not found: 'Void ServiceStack.ServiceInterface.AuthFeature..ctor(System.Func`1<ServiceStack.ServiceInterface.Auth.IAuthSession>, ServiceStack.ServiceInterface.Auth.IAuthProvider[])'.

我认为反射方法找不到类的构造函数,但是源中的类有public AuthFeature(Func<IAuthSession> sessionFactory, IAuthProvider[] authProviders, string htmlRedirect = "~/login")我认为它与缺少方法错误的签名匹配的构造函数。

工作 dll 版本的版本是 Nuget 的 3.9.43。如果需要,我可以提供更多详细信息。

4

0 回答 0