- private synchronized Class loadDynamicAuthenticationClass() {
- try {
- String authenticationObject = WebApplicationContextUtils.getWebApplicationContext(getServletContext())
- .getEnvironment().getProperty(AUTHENTICATION_CLASS);
- return Class.forName(authenticationObject);
- } catch (ClassNotFoundException e) {
- logger.error(
- "Exception caught when attempting to create associated class of config:" + AUTHENTICATION_CLASS, e);
- return Object.class;
- }
+ private synchronized String[] loadDynamicAuthenticationClasses() {
+ String[] authenticationObjects = WebApplicationContextUtils.getWebApplicationContext(getServletContext())
+ .getEnvironment().getProperty(AUTHENTICATION_CLASS).split(",");
+ Arrays.stream(authenticationObjects).forEach(className -> className.trim());
+ return authenticationObjects;