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(