문제

I have the following scenario

I have an STS that issues my tokens,I have used it to federate my ASP.NET application , this application calls A WCF Service to perform some need functionality.

But when I inspect the ClaimsPrinicipal.Current in ASP.NET application I find it were sit correctly to the claims of the user which I used to access the STS. But when I call the service from ASP.NET application and inspect ClaimsPricipal.Current I find it equals null.

As a workaround, I passed the ClaimsPricipal.Current from the ASP.NET application and I sit Thread.CurrentPricipal in the WCF service.

However , I don't feel that it is a correct approach.

So my questions are:

1)Why the ASP.NET claims principal is not like WCF principal ? 2)What is the correct approach to use the access token to access also the WCF service?

도움이 되었습니까?

해결책

The identit does not flow automatically to your backend service - you need to do identity delegation - or ActAs as it is often called in WIF speak.

Found this: http://weblogs.asp.net/gsusx/archive/2010/07/02/enabling-wif-actas-via-configuration.aspx

This is for WIF 1.0 - there are more samples out there.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top