Module: Responsys::Api::Authentication
Instance Method Summary collapse
Instance Method Details
#logged_in? ⇒ Boolean
20 21 22 |
# File 'lib/responsys/api/authentication.rb', line 20 def logged_in? !(session_id.nil? || jsession_id.nil? || header.nil?) end |
#login ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/responsys/api/authentication.rb', line 4 def login logout if logged_in? response = run(:login, credentials) establish_session_id(response) establish_jsession_id(response) set_session_credentials end |
#logout ⇒ Object
13 14 15 16 17 18 |
# File 'lib/responsys/api/authentication.rb', line 13 def logout return unless logged_in? run_with_credentials(:logout, nil) destroy_session_objects end |