final Principal userP = request.getUserPrincipal();
if (userP == null)
throw new IllegalStateException("User Principal is null");
final WebXACMLUtil util = new WebXACMLUtil();
try {
final RequestContext requestCtx = util.createXACMLRequest(request, role);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(toString(requestCtx));
}
final ResponseContext response = pdp.evaluate(requestCtx);
result = response.getDecision() == XACMLConstants.DECISION_PERMIT ? AuthorizationContext.PERMIT