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