class DbUsernameConverterService {

    public String toConnectionUsername(String host, String dbUser) {
        if (isAzure(host)) {
            LOGGER.debug("Detected Azure database server {}, appending short hostname to connection username", host);
            return dbUser + "@" + StringUtils.substringBefore(host, ".");
        }

        return dbUser;
    }

}