// first provider is for the root user
GeoServerRootAuthenticationProvider rootAuthProvider
= new GeoServerRootAuthenticationProvider();
rootAuthProvider.setSecurityManager(this);
rootAuthProvider.initializeFromConfig(null);
this.authProviders.add(rootAuthProvider);
//add the custom/configured ones
if(!config.getAuthProviderNames().isEmpty()) {
for (String authProviderName : config.getAuthProviderNames()) {