Class: Zoom::Client::JWT
- Inherits:
-
Zoom::Client
- Object
- Zoom::Client
- Zoom::Client::JWT
- Defined in:
- lib/zoom/clients/jwt.rb
Constant Summary
Constants included from Actions::Webinar
Actions::Webinar::RECURRENCE_KEYS, Actions::Webinar::SETTINGS_KEYS
Constants included from Actions::Recording
Actions::Recording::RECORDING_SETTINGS_KEYS
Instance Method Summary collapse
- #access_token ⇒ Object
-
#initialize(config) ⇒ JWT
constructor
A new instance of JWT.
Methods inherited from Zoom::Client
#auth_token, #bearer_authorization_header, #headers, #oauth_request_headers, #request_headers
Methods included from Actions
determine_request_options, extract_path_keys, make_request, parse_path
Constructor Details
#initialize(config) ⇒ JWT
Returns a new instance of JWT.
9 10 11 12 13 14 |
# File 'lib/zoom/clients/jwt.rb', line 9 def initialize(config) ::Logger.new(STDOUT).warn('Zoom::Client::JWT is deprecated. Please use Zoom::Client::ServerToServerOAuth instead. See: https://developers.zoom.us/docs/internal-apps/jwt-faq/') 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_token ⇒ Object
16 17 18 |
# File 'lib/zoom/clients/jwt.rb', line 16 def access_token ::JWT.encode({ iss: @api_key, exp: Time.now.to_i + @timeout }, @api_secret, 'HS256', { typ: 'JWT' }) end |