ClaimsAuthorizationManager pull policies from data

2019-04-11 00:25发布

问题:

I'm new to the Claims Security approach for authorizing users access to resources. I've been doing a lot of research and the majority of sites I've read have the policies for ClaimsAuthorizationManager entered in Web.config file. What are some ways to accomplish this? Can you point me to some links where policies are served from a database? Thanks.

回答1:

I also ran into the same problem. Hopefully these links will help you. What I did was implemented my own ClaimsAuthorizationManager to get the claims for the current user and used Thinktecture.IdentityModel for claims checks.

http://www.codeproject.com/Claims-Based-Authentication-and-Authorization

http://evolvingtechie.wordpress.com/misc/identity-and-access-management/claims-authorization-in-geneva-beta-2-%E2%80%93-introduction/

http://www.contentmaster.com/windows-communication-foundation/implementing-customizable-claims-based-authorization-with-windows-identity-foundation/

This has some snippets you can use. https://github.com/maniserowicz/claims-talk/tree/master/Claims.WG.NET/_snippets