code: protected List<String> getTokensFromHeader(Request request, String headerName) {
          List<String> result = new ArrayList<>();
  
          Enumeration<String> headers = request.getHeaders(headerName);
          while (headers.hasMoreElements()) {
              String header = headers.nextElement();
              String[] tokens = header.split(",");
              for (String token : tokens) {
                  result.add(token.trim());
              }
          }
  
          return result;
      }
docs: /*
  This only works for tokens. Quoted strings need more sophisticated parsing.