if (subject != null) {
return createSession(subject, workspaceName);
}
}
// login either using JAAS or our own LoginModule
AuthContext authCtx;
LoginModuleConfig lmc = repConfig.getLoginModuleConfig();
if (lmc == null) {
authCtx = new AuthContext.JAAS(repConfig.getAppName(), credentials);
} else {
authCtx = new AuthContext.Local(
lmc.getLoginModule(), lmc.getParameters(), credentials);
}
authCtx.login();
// create session
return createSession(authCtx, workspaceName);
} catch (SecurityException se) {
throw new LoginException(