docs: public boolean isValid() {
      boolean result = true;
  
      // The username attribute will always be required.
      result = (this.getUsername() != null);
  
      if (result == true && this.requiredTokenAttributes != null) {
        for (String attr : this.requiredTokenAttributes) {
          if (this.get(attr) == null) {
            result = false;
            break;
          }
        }
      }
  
      return result;
    }