Class: RedhatAccess::ConfigurationController

Inherits:
ApplicationController show all
Defined in:
app/controllers/redhat_access/configuration_controller.rb

Instance Method Summary collapse

Instance Method Details

#api_request?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/controllers/redhat_access/configuration_controller.rb', line 16

def api_request?
  true
end

#indexObject



6
7
8
9
10
11
12
13
14
# File 'app/controllers/redhat_access/configuration_controller.rb', line 6

def index
  strata_host = REDHAT_ACCESS_CONFIG[:strata_host]
  if strata_host.nil?
    strata_host = 'access.redhat.com'
  end
  client_id = "foreman_plugin_#{REDHAT_ACCESS_CONFIG[:deployment]}_#{RedhatAccess::VERSION}"
  render :json => { :strataHostName => strata_host,:strataClientId => client_id }.to_json,
    :layout => false
end