class ChefConfig::WorkstationConfigLoader
def apply_credentials(creds, profile)
def apply_credentials(creds, profile) Config.profile ||= profile if creds.key?("node_name") && creds.key?("client_name") raise ChefConfig::ConfigurationError, "Do not specify both node_name and client_name. You should prefer client_name." end Config.node_name = creds.fetch("node_name") if creds.key?("node_name") Config.node_name = creds.fetch("client_name") if creds.key?("client_name") Config.chef_server_url = creds.fetch("chef_server_url") if creds.key?("chef_server_url") Config.validation_client_name = creds.fetch("validation_client_name") if creds.key?("validation_client_name") extract_key(creds, "validation_key", :validation_key, :validation_key_contents) extract_key(creds, "validator_key", :validation_key, :validation_key_contents) extract_key(creds, "client_key", :client_key, :client_key_contents) @credentials_found = true end