private final String getContextId(EvaluationCtx context) { final URI contextIdType = STRING_ATTRIBUTE_TYPE_URI; final URI contextIdId = Constants.ACTION.CONTEXT_ID.attributeId; logger.debug("ContextAttributeFinder:findAttribute about to call getAttributeFromEvaluationCtx"); EvaluationResult attribute = context.getActionAttribute(contextIdType, contextIdId, null); Object element = getAttributeFromEvaluationResult(attribute); if (element == null) { logger.debug("ContextAttributeFinder:getContextId exit on can't get contextId on request callback"); return null; } if (!(element instanceof StringAttribute)) { logger.debug("ContextAttributeFinder:getContextId exit on couldn't get contextId from xacml request non-string returned"); return null; } String contextId = ((StringAttribute) element).getValue(); if (contextId == null) { logger.debug("ContextAttributeFinder:getContextId exit on null contextId"); return null; } if (!validContextId(contextId)) { logger.debug("ContextAttributeFinder:getContextId exit on invalid context-id"); return null; } return contextId; }
private final String getContextId(EvaluationCtx context) { final URI contextIdType = STRING_ATTRIBUTE_TYPE_URI; final URI contextIdId = Constants.ACTION.CONTEXT_ID.attributeId; logger.debug("ContextAttributeFinder:findAttribute about to call getAttributeFromEvaluationCtx"); EvaluationResult attribute = context.getActionAttribute(contextIdType, contextIdId, null); Object element = getAttributeFromEvaluationResult(attribute); if (element == null) { logger.debug("ContextAttributeFinder:getContextId exit on can't get contextId on request callback"); return null; } if (!(element instanceof StringAttribute)) { logger.debug("ContextAttributeFinder:getContextId exit on couldn't get contextId from xacml request non-string returned"); return null; } String contextId = ((StringAttribute) element).getValue(); if (contextId == null) { logger.debug("ContextAttributeFinder:getContextId exit on null contextId"); return null; } if (!validContextId(contextId)) { logger.debug("ContextAttributeFinder:getContextId exit on invalid context-id"); return null; } return contextId; }
for (String attributeId : im.keySet()) { EvaluationResult result = eval.getActionAttribute(new URI(im.get(attributeId)), new URI(attributeId), null);
break; case ACTION_TARGET: result = context.getActionAttribute(type, id, issuer); break; case ENVIRONMENT_TARGET: