0
mhuxley created
- ABP Framework version: v6.0.0
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Steps to reproduce the issue:
Hi there,
I need to implement something similar to the example code that was posted on this git issue: https://github.com/abpframework/abp/issues/2611#issuecomment-786072008
- I have a multi-tenant application. I have created a host user with a linked tenant user.
- I am using the domain tenant resolver
- I need to create middleware for the web host which will change the user based on the current tenant.
The middleware will need to:
- get the current tenant id
- use IdentityUserManager and IdentityLinkUserManager to retrieve the user with the above tenant id which is linked to the current user
- use ICurrentPrincipalAccessor to change the current user
However, it doesn't seem possible to use IdentityUserManager and IdentityLinkUserManager from within the web host.
Can you tell me if this is possible to do, and how?
Let me know if I can provide any additional details.
Thanks, Matt
1 Answer(s)
-
0
hi
However, it doesn't seem possible to use IdentityUserManager and IdentityLinkUserManager from within the web host.
By design, you should use the application service interface in web.host. You can create application services for IdentityUserManager and IdentityLinkUserManager.