code: protected void checkSupported(AuthType authType) {
      switch (authType) {
        case NOSASL:
        case SIMPLE:
        case CUSTOM:
          return;
        default:
          throw new RuntimeException("Authentication type not supported:" + authType.name());
      }
    }
docs: Used to check if given authentication is supported by the server.
  
  @param authType authentication type
  @throws RuntimeException if not supported