Class: SSO::BasicWithHidden
- Inherits:
-
Basic
- Object
- Basic
- SSO::BasicWithHidden
- Defined in:
- app/services/sso/basic_with_hidden.rb
Instance Method Summary collapse
Instance Method Details
#available? ⇒ Boolean
3 4 5 6 |
# File 'app/services/sso/basic_with_hidden.rb', line 3 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 |
#current_user ⇒ Object
8 9 10 |
# File 'app/services/sso/basic_with_hidden.rb', line 8 def current_user User.unscoped.where(:auth_source_id => ForemanVirtWhoConfigure::AuthSourceHiddenWithAuthentication.default.id).find_by_login(user) end |