Module: InsightsCloud::ClientAuthentication
- Extended by:
 - ActiveSupport::Concern
 
- Includes:
 - Katello::Authentication::ClientAuthentication
 
- Included in:
 - Api::MachineTelemetriesController
 
- Defined in:
 - app/controllers/concerns/insights_cloud/client_authentication.rb
 
Instance Method Summary collapse
- #authorize ⇒ Object
 - #client_authorized? ⇒ Boolean
 - #subscribed_host_by_uuid(uuid) ⇒ Object
 - #valid_machine_user? ⇒ Boolean
 
Instance Method Details
#authorize ⇒ Object
      7 8 9  | 
    
      # File 'app/controllers/concerns/insights_cloud/client_authentication.rb', line 7 def || super end  | 
  
#client_authorized? ⇒ Boolean
      11 12 13  | 
    
      # File 'app/controllers/concerns/insights_cloud/client_authentication.rb', line 11 def authenticate_client && valid_machine_user? end  | 
  
#subscribed_host_by_uuid(uuid) ⇒ Object
      19 20 21  | 
    
      # File 'app/controllers/concerns/insights_cloud/client_authentication.rb', line 19 def subscribed_host_by_uuid(uuid) @host = Host.unscoped.joins(:subscription_facet).where(:katello_subscription_facets => {:uuid => uuid }).first end  | 
  
#valid_machine_user? ⇒ Boolean
      15 16 17  | 
    
      # File 'app/controllers/concerns/insights_cloud/client_authentication.rb', line 15 def valid_machine_user? subscribed_host_by_uuid(User.current.uuid).present? end  |