IdentityServer4 - How to Implement Impersonation

為{幸葍}努か 提交于 2019-11-29 03:07:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!