username, password));
if(authentication == null || !authentication.isAuthenticated()) {
throw new AuthenticationException("Cannot authenticate " + username);
}
provider.destroy(null);
info(new StringResourceModel(LDAPAuthProviderPanel.class.getSimpleName() +
".connectionSuccessful", null).getObject());
} catch (Exception e) {
error(e);
LOGGER.log(Level.WARNING, e.getMessage(), e);