protected JettyWebAppContext setUpSecureAppContext(ConfigurationFactory configurationFactory, Map<String, SubjectInfo> roleDesignates, Map<Principal, Set<String>> principalRoleMap, ComponentPermissions componentPermissions, SubjectInfo defaultSubjectInfo, PermissionCollection checked, Set securityRoles) throws Exception {
String policyContextId = "TEST";
ApplicationPolicyConfigurationManager jacc = setUpJACC(roleDesignates, principalRoleMap, componentPermissions, policyContextId);
FormAuthenticator formAuthenticator = new FormAuthenticator();
formAuthenticator.setLoginPage("/auth/logon.html?param=test");
formAuthenticator.setErrorPage("/auth/logonError.html?param=test");
return setUpAppContext("Test JAAS Realm",
configurationFactory,
formAuthenticator,
policyContextId,
componentPermissions.getExcludedPermissions(),