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