Sha256: 03bb1928549065a03e2f931849621be4172f5db642207ce29c4b488e6f680f90

Contents?: true

Size: 585 Bytes

Versions: 40

Compression:

Stored size: 585 Bytes

Contents

module SSO
  class BasicWithHidden < Basic
    def available?
      authentication = Rack::Auth::Basic::Request.new(controller.request.env)
      Thread.current[:service_user_login] =  authentication.provided? && authentication.basic? && authentication.credentials.first =~ /virt_who_reporter_\d+/ && controller.api_request? && controller.is_a?(::Katello::Api::Rhsm::CandlepinProxiesController)
    end

    def current_user
      User.unscoped.where(:auth_source_id => ForemanVirtWhoConfigure::AuthSourceHiddenWithAuthentication.default.id).find_by_login(self.user)
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
foreman_virt_who_configure-0.5.18 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.17 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.16 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.15 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.14 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.13 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.12 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.11 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.10 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.9 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.8 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.7 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.6 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.5 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.4 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.3 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.2 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.1 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.0 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.4.5 app/services/sso/basic_with_hidden.rb