anchor.diff:      end.
   
   
  -parse_and_apply_services([]) ->
  -    ok;
  -parse_and_apply_services([ConfigFile|Tail])  ->
  -    ok = econfig:register_config(service,[ConfigFile]),
  -    ServiceConfig = econfig:get_value(service,""),
  -    ConfigMap = maps:from_list(ServiceConfig), 
  -    tts_service:add(ConfigMap), 
  -    ok = econfig:unregister_config(service), 
  -    parse_and_apply_services(Tail).
  -
   register_files(Name,Files) ->
       register_single_config(Name,only_first(Files)).  
   
  
positive.code:                     {"CacheCheckInterval",cache_check_interval,seconds,300},
                      {"CacheMaxEntries",cache_max_entries,integer,50000},
                      {"ServiceConfigPath",service_config_path,directory,"./services"},
                      {"IDHScript",idh_script,file,"./idh.py"},
                      {"IDHMaxWorker",idh_max_worker,integer,5}
                  ]).
  
  -define(OIDC_SETTINGS,[
                      {"Id",binary,""},
                      {"Description",binary,""},
                      {"ClientId",binary,""},
                      {"Secret",binary,""},
                      {"ConfigEndpoint",binary,""}
                  ]).
  
  
  apply_main_settings() ->
  
negative.code:     Files = generate_file_list(?MAIN_CONFIG_FILE),
      ok = register_files(main,Files),
      ok = apply_main_settings().
  
  read_oidc_configs() ->
      read_oidc_configs(get_(oidc_config_path, undefined)). 
  
  read_oidc_configs(undefined) ->
      ok;
  read_oidc_configs(BasePath) ->
      OidcConfs = filelib:wildcard(filename:join([BasePath,"*.conf"])), 
      parse_and_apply_oidc(OidcConfs), 
      ok.
  
  read_service_configs() ->
      read_service_configs(get_(service_config_path, undefined)). 
  