Sha256: a405843ea45762eb6469360dd70242651cce2d15bf70202728f2156c749d1ccb

Contents?: true

Size: 562 Bytes

Versions: 10

Compression:

Stored size: 562 Bytes

Contents

module ForemanRhCloud
  module CertAuth
    extend ActiveSupport::Concern

    include CloudRequest
    include InsightsCloud::CandlepinCache

    def cert_auth_available?(organization)
      !!candlepin_id_cert(organization)
    end

    def execute_cloud_request(params)
      certs = candlepin_id_cert(params.delete(:organization))
      final_params = {
        ssl_client_cert: OpenSSL::X509::Certificate.new(certs[:cert]),
        ssl_client_key: OpenSSL::PKey::RSA.new(certs[:key]),
      }.deep_merge(params)

      super(final_params)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
foreman_rh_cloud-5.0.46 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-5.0.45 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-5.0.44 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-5.0.43 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-5.0.42 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-5.0.41 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-5.0.39 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-5.0.38 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-5.0.37 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-5.0.36 app/services/foreman_rh_cloud/cert_auth.rb