Class: Zoom::Client::JWT

Inherits:
Zoom::Client show all
Defined in:
lib/zoom/clients/jwt.rb

Constant Summary

Constants included from Actions::Webinar

Actions::Webinar::RECURRENCE_KEYS, Actions::Webinar::SETTINGS_KEYS

Instance Method Summary collapse

Methods inherited from Zoom::Client

#request_headers

Methods included from Actions::IM::Chat

#chat_get, #chat_list

Methods included from Actions::Recording

#mc_recording_list, #recording_delete, #recording_get, #recording_list

Methods included from Actions::Report

#daily_report, #hosts_report, #meeting_details_report, #meeting_participants_report, #meeting_polls_report, #meetings_report, #telephone_report, #webinar_details_report, #webinar_participants_report, #webinar_polls_report, #webinar_qa_report

Methods included from Actions::Webinar

#past_webinar_list, #webinar_create, #webinar_delete, #webinar_get, #webinar_list, #webinar_panelist_add, #webinar_panelist_delete, #webinar_panelists_delete_all, #webinar_panelists_list, #webinar_registrant_add, #webinar_registrant_get, #webinar_registrants_list, #webinar_registrants_status_update, #webinar_status_update, #webinar_update

Methods included from Actions::Metrics

#metrics_crc, #metrics_meetingdetail, #metrics_meetings

Methods included from Actions::Meeting

#meeting_create, #meeting_delete, #meeting_end, #meeting_get, #meeting_list, #meeting_live, #meeting_register, #meeting_update, #meeting_update_status, #past_meeting_details, #past_meeting_participants

Methods included from Actions::User

#user_assistants_create, #user_assistants_delete, #user_assistants_delete_all, #user_assistants_list, #user_create, #user_delete, #user_email_check, #user_get, #user_list, #user_password_update, #user_permissions_get, #user_schedulers_delete, #user_schedulers_delete_all, #user_schedulers_list, #user_settings_get, #user_settings_update, #user_status_update, #user_token_delete, #user_token_get, #user_update, #user_upload_picture, #user_vanity_name_check

Methods included from Actions::Account

#account_billing_get, #account_billing_update, #account_create, #account_delete, #account_get, #account_list, #account_options_update, #account_plans_list, #account_settings_get, #account_settings_update, #some_method

Constructor Details

#initialize(config) ⇒ JWT

Returns a new instance of JWT.



8
9
10
11
12
# File 'lib/zoom/clients/jwt.rb', line 8

def initialize(config)
  Zoom::Params.new(config).require(:api_key, :api_secret)
  config.each { |k, v| instance_variable_set("@#{k}", v) }
  self.class.default_timeout(@timeout || 20)
end

Instance Method Details

#access_tokenObject



14
15
16
# File 'lib/zoom/clients/jwt.rb', line 14

def access_token
  ::JWT.encode({ iss: @api_key, exp: Time.now.to_i + @timeout }, @api_secret, 'HS256', { typ: 'JWT' })
end