Sha256: 1eb3cd8d4020448f23bd48c7350fdf472c7a45462b0a587d47e51bea1d4d73c6

Contents?: true

Size: 580 Bytes

Versions: 6

Compression:

Stored size: 580 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(user)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman_virt_who_configure-0.5.25 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.24 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.23 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.21 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.20 app/services/sso/basic_with_hidden.rb
foreman_virt_who_configure-0.5.19 app/services/sso/basic_with_hidden.rb