csharpfritz / csharp_with_csharpfritz

Show notes, slides, and samples from the CSharp with CSharpFritz show
MIT License
662 stars 214 forks source link

PingFederate ASP.NET Core Identity Integration #144

Open AAKingJames opened 1 year ago

AAKingJames commented 1 year ago

Our company uses PingFederate for authentication and I'm forced to use it. I love the functionality that ASP.NET Core Identity provides for authorization. What would be the best way to integrate PingFederate with ASP.NET Core Identity so I get the best of both worlds? Has anyone done this?

TheLankyScottishNerd commented 1 year ago

Hey @AAKingJames,

I've had a little look at this and although I have not personally done this, I believe this would be a simple as setting up PingIdentity as an identity provider within your app using JWT Bearer Authentication.

OIDC would be used here as outlined within PingIdentity's docs: https://docs.pingidentity.com/r/en-us/pingfederate-112/pf_creat_openid_connect_idp_connect

So, think of ping as an Active Directory/OAuth/Firebase Auth alternative OIDC Provider and implement your OIDC JWT bearer using instructions such as: https://devblogs.microsoft.com/dotnet/jwt-validation-and-authorization-in-asp-net-core/.

Let me know if this gets you any further. :)