Has any one made a multitenant example with a custom useraccount using membershipreboot.owin ?
I Have a hard time figuring out how I should configure the membership middleware when using a custom account. Its not covered by the default examples. And I guess i'm not experienced enough with funky Funcs. Any help would be appreciated.
Thx.
The OwinExtentionMethods looks like :
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);
}
How would I fill in the two func's ?
Func<IDictionary<string, object>, UserAccountService<TAccount>>
and
Func<IDictionary<string, object>, AuthenticationService<TAccount>>
The custom user account sample has an example of using the generics:
https://github.com/brockallen/BrockAllen.MembershipReboot/tree/master/samples/CustomUserAccount