Map<String, Object> contextMap = new HashMap<String, Object>();
contextMap.put(ResourceKeys.RESOURCE_PERM_CHECK, Boolean.TRUE);
contextMap.put(ResourceKeys.POLICY_REGISTRATION, policyRegistration);
contextMap.put("securityConstraints", securityConstraints);
AbstractWebAuthorizationHelper helper = null;
try
{
helper = SecurityHelperFactory.getWebAuthorizationHelper(sc);
}
catch (Exception e)
{
log.error("Exception in obtaining helper", e);
return false;
}
helper.setPolicyRegistration(policyRegistration);
helper.setEnableAudit(this.enableAudit);
//WebAuthorizationHelper helper = new WebAuthorizationHelper(sc, this.enableAudit);
ok = helper.checkResourcePermission(contextMap, request, response, caller, PolicyContext.getContextID(),
requestURI(request));
}
boolean finalDecision = baseDecision && ok;
if (trace)
log.trace("hasResourcePerm:RealmBase says:" + baseDecision + "::Authz framework says:" + ok + ":final=" + finalDecision);