Sha256: fab723a59d3fcce9a7ea35fc69a0947ffc5b6dcbad0f2421d3cf148fed232bb4

Contents?: true

Size: 558 Bytes

Versions: 32

Compression:

Stored size: 558 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.read(certs[:key]),
      }.deep_merge(params)

      super(final_params)
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
foreman_rh_cloud-11.0.3 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-9.0.59 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-11.0.2 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-11.0.1 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-11.0.0 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-9.0.58 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-10.0.2 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-9.0.57 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-10.0.1 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-9.0.56 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-9.0.55 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-9.0.54 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-9.0.53 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-9.0.52 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-8.0.52 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-9.0.51 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-8.0.51 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-7.0.48 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-7.0.47 app/services/foreman_rh_cloud/cert_auth.rb
foreman_rh_cloud-8.0.50 app/services/foreman_rh_cloud/cert_auth.rb