String encrypterName =config.getConfigPasswordEncrypterName();
if (isNotEmpty(encrypterName)==false) {
throw createSecurityException(PASSWORD_ENCODER_REQUIRED);
}
GeoServerPasswordEncoder encoder = null;
try {
encoder = manager.loadPasswordEncoder(config.getConfigPasswordEncrypterName());
} catch (NoSuchBeanDefinitionException ex) {
throw createSecurityException(INVALID_PASSWORD_ENCODER_$1, encrypterName);
}
if (encoder == null) {
throw createSecurityException(INVALID_PASSWORD_ENCODER_$1, encrypterName);
}
if (!encoder.isReversible()) {
throw createSecurityException(INVALID_PASSWORD_ENCODER_$1, encrypterName);
}
if (!manager.isStrongEncryptionAvailable()) {
if (encoder!=null && encoder.isAvailableWithoutStrongCryptogaphy()==false) {
throw createSecurityException(INVALID_STRONG_CONFIG_PASSWORD_ENCODER);
}
}
String roleServiceName = config.getRoleServiceName();