code: private String extractGrantCode(String urlString) throws MalformedURLException {
  
          URL url = new URL(urlString);
          String code = Utils.getParameterValueFromQuery(url.getQuery(), "code");
  
          if (code == null){
              throw new RuntimeException("Failed to extract grant code from url");
          }
  
          logger.debug("Grant code extracted successfully");
          return code;
      }
docs: Extract grant code from url string
  @param urlString url that contain the grant code
  @return grant code
  @throws MalformedURLException in case of illegal url format