authCtx.login();
// create session, and add SimpleCredentials attributes (JCR-1932)
SessionImpl session = createSession(authCtx, workspaceName);
if (credentials instanceof SimpleCredentials) {
SimpleCredentials sc = (SimpleCredentials) credentials;
for (String name : sc.getAttributeNames()) {
session.setAttribute(name, sc.getAttribute(name));
}
}
return session;
} catch (SecurityException se) {
throw new LoginException("Unable to access authentication information", se);