dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.64k stars 25.28k forks source link

How to access Claims when using Ws-Fed? #30307

Open MithunChopda opened 1 year ago

MithunChopda commented 1 year ago

Is there any guidance available on how to load/access the Claims once Ws-Federation is configured without Identity? Seems the options.CallbackPath needs to be configured to an endpoint where the claims will be posted. But there is no guidance on how to implement such an endpoint and how to read user's claims based on the (SAML?) claims received from Idp.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

MithunChopda commented 1 year ago

@Rick-Anderson Please share what more info is needed and I'll try to provide.

MithunChopda commented 1 year ago

@Rick-Anderson any update on this request is appreciated.

The thing is I am stuck with integrating WSFed with my .NET6 application. As per non-MS documentation over internet, there is a WsReply property that needs to be configured. This is the (POST) endpoint where the claims will be posted. I see in the browser trace that the RequestSecurityResponseToken is received on the /signin-wsfed endpoint but nothing happens further. The code inside this /signin-wsfed method never executes and nor is the middleware hydrating the Claims.

Is anything missing in the guidance document? Do we have a working sample that actually reads claims without using the ASP.NET Core Identity?

mkArtakMSFT commented 9 months ago

@halter73 can you please review this? Thanks!