有没有人使用 membersreboot.owin 使用自定义用户帐户制作多租户示例?
我很难弄清楚在使用自定义帐户时应该如何配置会员中间件。默认示例未涵盖它。而且我想我对时髦的 Funcs 没有足够的经验。任何帮助,将不胜感激。
谢谢。
OwinExtentionMethods 看起来像:
public static class MembershipRebootOwinExtensions
{
public static void UseMembershipReboot<TAccount>(
this IAppBuilder app,
Func<IDictionary<string, object>, UserAccountService<TAccount>> userAccountServiceFactory,
Func<IDictionary<string, object>, AuthenticationService<TAccount>> authenticationServiceFactory = null
)
where TAccount : UserAccount
{
app.Use<MembershipRebootMiddleware<TAccount>>(userAccountServiceFactory, authenticationServiceFactory);
app.UseMembershipReboot();
}
public static void UseMembershipReboot<TAccount>(
this IAppBuilder app,
CookieAuthenticationOptions cookieOptions,
Func<IDictionary<string, object>, UserAccountService<TAccount>> userAccountServiceFactory,
Func<IDictionary<string, object>, AuthenticationService<TAccount>> authenticationServiceFactory = null
)
where TAccount : UserAccount
{
app.Use<MembershipRebootMiddleware<TAccount>>(userAccountServiceFactory, authenticationServiceFactory);
app.UseMembershipReboot(cookieOptions);
}
我将如何填写这两个函数?
Func<IDictionary<string, object>, UserAccountService<TAccount>>
和
Func<IDictionary<string, object>, AuthenticationService<TAccount>>