code: func (o *OIDCConnectorV2) Check() error {
  	if o.Metadata.Name == "" {
  		return trace.BadParameter("ID: missing connector name")
  	}
  	if o.Metadata.Name == teleport.Local {
  		return trace.BadParameter("ID: invalid connector name %v is a reserved name", teleport.Local)
  	}
  	if _, err := url.Parse(o.Spec.IssuerURL); err != nil {
  		return trace.BadParameter("IssuerURL: bad url: '%v'", o.Spec.IssuerURL)
  	}
  	if _, err := url.Parse(o.Spec.RedirectURL); err != nil {
  		return trace.BadParameter("RedirectURL: bad url: '%v'", o.Spec.RedirectURL)
  	}
  	if o.Spec.ClientID == "" {
  		return trace.BadParameter("ClientID: missing client id")
  	}
  
  	// make sure claim mappings have either roles or a role template
  	for _, v := range o.Spec.ClaimsToRoles {
  		hasRoles := false
  		if len(v.Roles) > 0 {
  			hasRoles = true
  		}
  		hasRoleTemplate := false
  		if v.RoleTemplate != nil {
  			hasRoleTemplate = true
  		}
  
  		// we either need to have roles or role templates not both or neither
  		// ! ( hasRoles XOR hasRoleTemplate )
  		if hasRoles == hasRoleTemplate {
  			return trace.BadParameter("need roles or role template (not both or none)")
  		}
  	}
  
  	return nil
  }
docs: // Check returns nil if all parameters are great, err otherwise