0D54z000098sJqqCAEOkta Classic EngineAuthenticationAnswered2024-04-17T09:42:31.000Z2023-04-28T19:32:27.000Z2023-06-05T19:04:05.000Z

jpljw (jpljw) asked a question.

How to replace attribute [Authorize(Roles="admin")] in MVC?

Hi,

We have an application using ASP.NET 4.8 with MVC 5. Was using ASP.NET Identity for login. Now we want to migrate to Okta. So how do I replace the class and methold level attribute [Authorize(Roles="admin")]? I have two situations, both need answer.

  1. Assume I have a corresponding "admin" claim after logged in with Okta. What to do?
  2. Assume I still use local [AspNetUserRoles] and [AspNetRoles] to check user role. What to do? Someone may ask why we do this, but we have very complex user athorization logic and don't want to put those in Okta.

Thanks you.


This question is closed.

Recommended content

No recommended content found...