Class: Mediaflux::LogonRequest
- Defined in:
 - app/models/mediaflux/logon_request.rb
 
Class Method Summary collapse
- 
  
    
      .mediaflux  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    
The Rails configuration options specifying the Mediaflux server.
 - 
  
    
      .mediaflux_domain  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Specifies the user domain for the Mediaflux API authentication.
 - 
  
    
      .mediaflux_password  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Specifies the password for the Mediaflux API authentication.
 - 
  
    
      .mediaflux_user  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Specifies the user for the Mediaflux API authentication.
 - 
  
    
      .service  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Specifies the logon service within the Mediaflux API.
 
Instance Method Summary collapse
- 
  
    
      #initialize(domain: self.class.mediaflux_domain, user: self.class.mediaflux_user, password: self.class.mediaflux_password, identity_token: nil, token_type: nil)  ⇒ LogonRequest 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of LogonRequest.
 - 
  
    
      #session_token  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Authenticates the Mediaflux API using the credentials set within the Rails configuration, and set the token for the API session if the request has not already been resolved.
 
Methods inherited from Request
build_post_request, default_xml_namespace, default_xml_namespace_uri, #error?, find_or_create_http_client, format_date_for_mediaflux, request_path, #resolve, #resolved?, #response_body, #response_error, #response_xml, uri, #xml_payload, #xtoshell_xml
Constructor Details
#initialize(domain: self.class.mediaflux_domain, user: self.class.mediaflux_user, password: self.class.mediaflux_password, identity_token: nil, token_type: nil) ⇒ LogonRequest
Returns a new instance of LogonRequest.
      28 29 30 31 32 33 34 35  | 
    
      # File 'app/models/mediaflux/logon_request.rb', line 28 def initialize(domain: self.class.mediaflux_domain, user: self.class.mediaflux_user, password: self.class.mediaflux_password, identity_token: nil, token_type: nil) @domain = domain @user = user @password = password @identity_token = identity_token @token_type = token_type super() end  | 
  
Class Method Details
.mediaflux ⇒ Hash
The Rails configuration options specifying the Mediaflux server
      49 50 51  | 
    
      # File 'app/models/mediaflux/logon_request.rb', line 49 def mediaflux Rails.configuration.mediaflux end  | 
  
.mediaflux_domain ⇒ String
Specifies the user domain for the Mediaflux API authentication
      12 13 14  | 
    
      # File 'app/models/mediaflux/logon_request.rb', line 12 def self.mediaflux_domain mediaflux["api_domain"] end  | 
  
.mediaflux_password ⇒ String
Specifies the password for the Mediaflux API authentication
      24 25 26  | 
    
      # File 'app/models/mediaflux/logon_request.rb', line 24 def self.mediaflux_password mediaflux["api_password"] end  | 
  
.mediaflux_user ⇒ String
Specifies the user for the Mediaflux API authentication
      18 19 20  | 
    
      # File 'app/models/mediaflux/logon_request.rb', line 18 def self.mediaflux_user mediaflux["api_user"] end  | 
  
.service ⇒ String
Specifies the logon service within the Mediaflux API
      6 7 8  | 
    
      # File 'app/models/mediaflux/logon_request.rb', line 6 def self.service "system.logon" end  | 
  
Instance Method Details
#session_token ⇒ String
Authenticates the Mediaflux API using the credentials set within the Rails configuration, and set the token for the API session if the request has not already been resolved
      40 41 42  | 
    
      # File 'app/models/mediaflux/logon_request.rb', line 40 def session_token @session_token ||= response_session_token end  |