def api_token_header(options, path = nil)
      return nil if path == '/j_security_check'
      unless @api_token
        fail Error::MissingCredentials, 'Please set a api_token for user'
      end
      options[:headers] = {} if options[:headers].nil?
      options[:headers].merge!('X-Rundeck-Auth-Token' => @api_token)
    end
def api_token_header(options, path = nil)
      return nil if path == '/j_security_check'
      unless @api_token
        fail Error::MissingCredentials, 'Please set a api_token for user'
      end
      options[:headers] = {} if options[:headers].nil?
      options[:headers].merge!('X-Rundeck-Auth-Token' => @api_token)
    end
Sets a PRIVATE-TOKEN header for requests.
 @raise [Error::MissingCredentials] if api_token not set.