Installing an identity claim makes your application security more efficient and saves time spent on your database.
The aforementioned method may be known as Claim Conversion, which often involves reading data that translates into claims after successful authentication.
To read it later, you can do this:
Update
Just to provide additional information for the answer, as described in the comments below.
When using a requirements-based approach, you can also use the claims authorization manager, which can provide centralized / fine-grained control over access to resources and actions.
If you havenβt used the requirements, before you think about actions against resources, rather than role-based permissions. Thus, you can drill right and control access to each resource / action individually, and not have many roles for each of them.
I personally like to use the mixture, but also retain the role as a complaint. That way, I can use standard authorization tags in mvc with roles that read claims and use the thinktecture / ClaimsAuthorization attributes to force the claims authorization manager to accept more complex rules.
A good link to MVC 4 claims-based authentication is available here:
http://dotnetcodr.com/2013/02/25/claims-based-authentication-in-mvc4-with-net4-5-c-part-1-claims-transformation/
hutchonoid
source share