Class: Contentful::Scheduler::Auth

Inherits:
Object
  • Object
show all
Defined in:
lib/contentful/scheduler/auth.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(webhook) ⇒ Auth

Returns a new instance of Auth.



6
7
8
# File 'lib/contentful/scheduler/auth.rb', line 6

def initialize(webhook)
  @webhook = webhook
end

Instance Attribute Details

#webhookObject (readonly)

Returns the value of attribute webhook.



4
5
6
# File 'lib/contentful/scheduler/auth.rb', line 4

def webhook
  @webhook
end

Instance Method Details

#authObject



10
11
12
13
14
15
16
17
# File 'lib/contentful/scheduler/auth.rb', line 10

def auth
  return true if auth_config.nil?

  return verify_key_value_config if key_value_config?
  return verify_lambda_config if lambda_config?

  false
end