* @throws UnexpectedErrorException if some unexpected error occurred
* @throws NoConnectionException if some connection error occurred
*/
private Map<String, String> authenticateByAvailablePlugin(String username, String passwordHash)
throws UnexpectedErrorException, NoConnectionException {
AuthenticationPlugin authPlugin
= (AuthenticationPlugin) pluginLoader.getPluginByClassName(AuthenticationPlugin.class);
Map<String, String> authInfo = new HashMap<>();
if (authPlugin != null && authPlugin.getState() == Plugin.State.ENABLED) {
authInfo.putAll(authPlugin.authenticate(username, passwordHash));
}
return authInfo;
}