开发者

How do I propogate Windows Identity without using delegation in WCF?

I need to propagate the Windows Identity of the current user across two service calls.

Service A (which runs under integrated authentication) calls Service B (which also runs und开发者_JS百科er integrated authentication). I need to identify the user identity which was used to call Service A in Service B's code.

I know this is possible using delegation, by impersonating the User in Service A code and then call Service B from the impersonated code.

However, I only want to flow the identity and not impersonate the user. Is this possible without impersonation?


get the authenticated user using ServiceSecurityontext.Current.PrimaryIdentity.Name

Add this as either a header or a field in the downstream service request


I think you are looking for the impersonation level called "Identity". See this article for a description of different impersonation levels in WCF.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜