// Forces Spring Security to use inheritable strategy
// FIXME find a better place for forcing spring security mode
// doesn't work for the time being
-// if (System.getProperty(SecurityContextHolder.SYSTEM_PROPERTY) == null)
-// SecurityContextHolder
-// .setStrategyName(SecurityContextHolder.MODE_INHERITABLETHREADLOCAL);
+ // if (System.getProperty(SecurityContextHolder.SYSTEM_PROPERTY) ==
+ // null)
+ // SecurityContextHolder
+ // .setStrategyName(SecurityContextHolder.MODE_INHERITABLETHREADLOCAL);
}
private final static Log log = LogFactory
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);
if (log.isTraceEnabled())
log.trace("System authenticated");
public void setSystemAuthenticationKey(String systemAuthenticationKey) {
this.systemAuthenticationKey = systemAuthenticationKey;
}
-
}