public static String[] decodeWithScheme(String input) {
        String[] split = StringUtils.split(input, null);
        if ("Basic".equalsIgnoreCase(split[0])) {
            if (split.length == 2) {
                return decode(split[1]);
            } else {
                throw new IllegalArgumentException("Authorization header invalid for BASIC");
            }
        } else {
            throw new IllegalArgumentException("Auth scheme was not BASIC");
        }
    }
Decode BASIC value that includes the {@code Basic } scheme segment.
common/util/src/main/java/io/apiman/common/util/Basic.java