索赔之间的关系 [英] Relationship between claims

查看:87
本文介绍了索赔之间的关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好


我需要为角色创建和分配任务,包括类似于AZman的授权规则。


我想过了创建自定义属性存储以保存角色和任务。我不确定如何使用声明和附加规则在角色和任务之间创建关系。第二种选择是创建我自己的角色提供程序,其具有任务功能
,并从我的Web应用程序中的属性存储中直接填充任务和角色。有什么想法?


谢谢

解决方案

你会采用不同的方法 -  


1)您的理赔身份需要包含做出授权决定的所有必要声明(与AzMan相比,这些将是名称和角色)


2)你定义你的任务


3)你在调用ClaimsAuthorizationManager时使用你定义的任务 - 在那里你将任务映射到用户的必要声明(例如角色)。


Hi

I need to create and assign tasks to a role including a authorisation rule similar to AZman.

I thought off creating a custom attribute store to save the roles and tasks. I am not sure how you would create a relationship between roles and tasks using claims and attaching a rule. A second option would be to create my own role provider that has functionality for tasks and populate the tasks and roles directlty from the attribute store in my web application. Any ideas?

Thank you

解决方案

You would use a different approach - 

1) your claims identity needs to contain all necessary claims to make authorization decision (compared to AzMan these would be the name and roles)

2) You define your tasks

3) You use your defined tasks when calling into ClaimsAuthorizationManager - in there you map the tasks to the necessary claims of the user (e.g. roles).


这篇关于索赔之间的关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆