Can Cocktail be configured to use multiple authentications?
I have a requirement to allow an application to login in to multiple
databases (different models) simultaneously – this is at the proof of concept
stage.
My initial thought was to have multiple implementations of
AuthenticationService, all exporting IAuthenticationService. My LoginViewModel
imports many IAuthenticationService (exposed as a combo box so the user can
choose which authentication service to login to).
There are a couple of issues;
In Composition.Clients.cs OnEntityManagerCreated gives the error “Probed
for service with contract IAuthenticationService and found multiple matching
exports” – so it seems I can only have one IAuthenticationService.
Secondly, if I could have multiple AuthenticationServices how to
configure the individual EntityManagerProviders to use the correct
AuthenticationService?
Regards, Paul