src/main/java/com/rockagen/commons/http/HttpConn.java
public static UsernamePasswordCredentials getUPC(String username,
                                                     String password) {
        if (CommUtil.isBlank(username) && CommUtil.isBlank(password)) {
            return null;
        }
        return new UsernamePasswordCredentials(username, password);
    }
public static UsernamePasswordCredentials getUPC(String username,
                                                     String password) {
        if (CommUtil.isBlank(username) && CommUtil.isBlank(password)) {
            return null;
        }
        return new UsernamePasswordCredentials(username, password);
    }
Get UsernamePasswordCredentials

@param username username
@param password password
@return UsernamePasswordCredentials