是否可以通过The Evaluation Context传递额外的属性?我想基于地理位置信息创建JavaScript策略,其中(webapp)客户端将国家/地区代码作为运行时属性传递。所以政策看起来像这样:
var context = $evaluation.getContext();
var attr = context.getAttributes();
var geoloc = attr.getValue('notkc.country_of_origin'); //gets passed to the auth request
if (VALID_COUNTRIES.indexOf(geoloc)) > -1) {
$evaluation.grant();
}
有a mailing list discussion back in February 2017其中一位核心团队成员(佩德罗)表示目前不可能,但正在考虑之中。半年后有a JIRA issue 5457表示可以从资源许可中获得,但我不知道这是如何工作的。
更新:通过Claim Information Point在某些时候添加了支持:它可以使用各种来源(HTTP请求,...)将信息推送到上下文中。