code: func (s *Server) loadAuthMethodValidator(idx uint64, method *structs.ACLAuthMethod) (authmethod.Validator, error) {
  	if prevIdx, v, ok := s.getCachedAuthMethodValidator(method.Name); ok && idx <= prevIdx {
  		return v, nil
  	}
  
  	v, err := authmethod.NewValidator(method)
  	if err != nil {
  		return nil, fmt.Errorf("auth method validator for %q could not be initialized: %v", method.Name, err)
  	}
  
  	v = s.getOrReplaceAuthMethodValidator(method.Name, idx, v)
  
  	return v, nil
  }
docs: // loadAuthMethodValidator returns an authmethod.Validator for the given auth
  // method configuration. If the cache is up to date as-of the provided index
  // then the cached version is returned, otherwise a new validator is created
  // and cached.