问题
I have a requirement of allowing our internal support users to impersonate our customer users.
I'm currently using IdentityServer4, Implicit Flow and OIDC Client.
Resources found so far.
[Question]IdentityServer4 user impersonation #853
Generate access token with IdentityServer4 without password
Given that there are limited resources online, are there any suggestions on how I can/should implement impersonation with IdentityServer4?
回答1:
Probably wouldn't try to build an impersonation feature into the core IdentityServer4 libraries. You really just need a small data structure to hold your impersonated UserId and a service to check for that. It is a foundation feature that you application should be designed around.
Also consider, you may need superuser features that still present themselves even though you are impersonating (e.g. un-impersonate).
来源:https://stackoverflow.com/questions/45549824/identityserver4-how-to-implement-impersonation