isAuthenticated = true;
}
}
AccessControlContext acc = ContextManager.getCurrentContext();
/**
* JACC v1.0 section 4.1.1
*/
WebUserDataPermission wudp = new WebUserDataPermission(substitutedPathInContext, new String[]{request.getMethod()}, transportType);
acc.checkPermission(wudp);
WebResourcePermission webResourcePermission = new WebResourcePermission(request);
/**
* JACC v1.0 section 4.1.2
*/
if (isAuthenticated) {
//current user is logged in, this is the actual check
acc.checkPermission(webResourcePermission);
} else {
//user is not logged in: if access denied, try to log them in.
try {
acc.checkPermission(webResourcePermission);
} catch (AccessControlException e) {
//not logged in: try to log them in.
Principal user = authenticator.authenticate(realm, pathInContext, request, response);
if (user == SecurityHandler.__NOBODY) {
return true;