token config parsing logic