Class: ClerkHttpClient::ProxyChecksApi

Inherits:
Object
  • Object
show all
Defined in:
lib/clerk-http-client/api/proxy_checks_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProxyChecksApi



19
20
21
# File 'lib/clerk-http-client/api/proxy_checks_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/clerk-http-client/api/proxy_checks_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#verify_domain_proxy(opts = {}) ⇒ ProxyCheck

Verify the proxy configuration for your domain This endpoint can be used to validate that a proxy-enabled domain is operational. It tries to verify that the proxy URL provided in the parameters maps to a functional proxy that can reach the Clerk Frontend API. You can use this endpoint before you set a proxy URL for a domain. This way you can ensure that switching to proxy-based configuration will not lead to downtime for your instance. The ‘proxy_url` parameter allows for testing proxy configurations for domains that don’t have a proxy URL yet, or operate on a different proxy URL than the one provided. It can also be used to re-validate a domain that is already configured to work with a proxy.

Options Hash (opts):



28
29
30
31
# File 'lib/clerk-http-client/api/proxy_checks_api.rb', line 28

def verify_domain_proxy(opts = {})
  data, _status_code, _headers = verify_domain_proxy_with_http_info(opts)
  data
end

#verify_domain_proxy_with_http_info(opts = {}) ⇒ Array<(ProxyCheck, Integer, Hash)>

Verify the proxy configuration for your domain This endpoint can be used to validate that a proxy-enabled domain is operational. It tries to verify that the proxy URL provided in the parameters maps to a functional proxy that can reach the Clerk Frontend API. You can use this endpoint before you set a proxy URL for a domain. This way you can ensure that switching to proxy-based configuration will not lead to downtime for your instance. The &#x60;proxy_url&#x60; parameter allows for testing proxy configurations for domains that don&#39;t have a proxy URL yet, or operate on a different proxy URL than the one provided. It can also be used to re-validate a domain that is already configured to work with a proxy. POST

Options Hash (opts):



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/clerk-http-client/api/proxy_checks_api.rb', line 39

def verify_domain_proxy_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ProxyChecksApi.verify_domain_proxy ...'
  end
  # resource path
  local_var_path = '/proxy_checks'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'verify_domain_proxy_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'ProxyCheck'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearerAuth']

  new_options = opts.merge(
    :operation => :"ProxyChecksApi.verify_domain_proxy",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProxyChecksApi#verify_domain_proxy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end