I have an old ASP.NET MVC 4.x framework (c#) webapp that uses sql server membership users and roles. It has the SQL server schema that with the table dbo.AspNetUsers table instead dbo.aspnet_Users. Our customer now wants the webapp to authenticate with SSO using OAuth 2.0. I am new to OAuth 2.0 and most resources points to samples and implementations with ASP.NET MVC core.
I saw how it works on another wepapp where you type the app url and then redirects you to the SSO login page and then returns to the webapp.
I do not know which SSO OAuth server they will be using. Does the SSO server used changes the client code?
Can someone point me to links or resources to help with this?
I downloaded and old version from identityserver4 and pasted some sample code on the Startup.Auth.cs class. Set it up to redirect to the identityserver4 server for external signin, but after the redirect back I get a ClaimsPrincipal instead of the regular principal we currently have.
For more info, we currently use methods like "User.IsInRole("Administrator")" in the menu to show more options for administrators or other Roles. Also we use the attribute [CustomAuthorize(Roles = "Administrator")] on controller classes. All this does not work at this moment.
Is it possible to implement this change getting the username from the SSO server but keeping the existing role based security?
Sorry, I'm not good at english.