- // "There is already an authenticated subject: " + subject);
-
- String key = systemAuthenticationKey != null ? systemAuthenticationKey
- : System.getProperty(
- InternalAuthentication.SYSTEM_KEY_PROPERTY,
- InternalAuthentication.SYSTEM_KEY_DEFAULT);
- if (key == null)
- throw new ArgeoException("No system key defined");
- Authentication auth = authenticationManager
- .authenticate(new InternalAuthentication(key));
- securityContext.setAuthentication(auth);
- authenticatedBySelf.set(true);
+ // "System execution on an already authenticated thread: "
+ // + currentAuth + ", THREAD="
+ // + Thread.currentThread().getId());
+ // return;
+ // }
+ //
+ // String key = systemAuthenticationKey != null ?
+ // systemAuthenticationKey
+ // : System.getProperty(
+ // SystemAuthentication.SYSTEM_KEY_PROPERTY,
+ // InternalAuthentication.SYSTEM_KEY_DEFAULT);
+ // if (key == null)
+ // throw new ArgeoException("No system key defined");
+ // if (authenticationManager == null)
+ // throw new ArgeoException("Authentication manager cannot be null.");
+ // Authentication auth = authenticationManager
+ // .authenticate(new InternalAuthentication(key));
+ // securityContext.setAuthentication(auth);
+ //
+ // authenticatedBySelf.set(true);