开发者

Get identity-level token for Windows user?

开发者 https://www.devze.com 2022-12-29 20:06 出处:网络
I want to create a WindowsIdentity for a given user. I don\'t need it for impersonation, just for group membership checks. I need it to work with and without a domain开发者_StackOverflow社区 (none of

I want to create a WindowsIdentity for a given user. I don't need it for impersonation, just for group membership checks. I need it to work with and without a domain开发者_StackOverflow社区 (none of that S4U Kerberos delegation stuff). The constructor for WindowsIdentity that takes a username only seems to work for domain scenarios.

Is there any other way I can get a WindowsIdentity to perform access checks? The best workaround I have is to use DirectoryServices.AccountManagement to find the user then enumerate their groups.

0

精彩评论

暂无评论...
验证码 换一张
取 消