- final Repository repository = getRepositoryBlocking();
- systemExecutor.execute(new Runnable() {
- public void run() {
- Session session = null;
- try {
- session = repository.login(workspace);
- // WARNING: at this stage we assume that teh java properties
- // will have the same value
- String userName = System.getProperty("user.name");
- Node userHome = JcrUtils.getUserHome(session, userName);
- if (userHome == null)
- userHome = JcrUtils.createUserHome(session,
- homeBasePath, userName);
- // authen.setDetails(getUserDetails(userHome, authen));
- } catch (RepositoryException e) {
- throw new ArgeoException(
- "Unexpected exception when synchronizing OS and JCR security ",
- e);
- } finally {
- JcrUtils.logoutQuietly(session);
- }
- }
- });
- return authen;
- }
-
- /** Builds user details based on the authentication and the user home. */
- protected UserDetails getUserDetails(Node userHome, Authentication authen) {