197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
# File 'lib/bundles/inspec-compliance/api.rb', line 197
def self.(config)
token = get_token(config)
if is_automate_server?(config) || is_automate2_server?(config)
= { 'chef-delivery-enterprise' => config['automate']['ent'] }
if config['automate']['token_type'] == 'dctoken'
['x-data-collector-token'] = token
else
['chef-delivery-user'] = config['user']
['chef-delivery-token'] = token
end
else
= { 'Authorization' => "Bearer #{token}" }
end
end
|