Class: Kongfigure::Resources::Consumers::KeyAuth

Inherits:
Base
  • Object
show all
Defined in:
lib/kongfigure/resources/consumers/key_auth.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#id, #kongfigure_ignore_fields, #plugins, #unchanged, #updated

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, build_all, #display_name, #has_to_be_deleted?, #initialize, #mark_as_unchanged, #mark_as_updated

Constructor Details

This class inherits a constructor from Kongfigure::Resources::Base

Instance Attribute Details

#keyObject

Returns the value of attribute key.



4
5
6
# File 'lib/kongfigure/resources/consumers/key_auth.rb', line 4

def key
  @key
end

Class Method Details

.build(hash) ⇒ Object



6
7
8
9
10
# File 'lib/kongfigure/resources/consumers/key_auth.rb', line 6

def self.build(hash)
  key_auth     = new(hash["id"])
  key_auth.key = hash["key"]
  key_auth
end

Instance Method Details

#api_attributesObject



24
25
26
27
28
# File 'lib/kongfigure/resources/consumers/key_auth.rb', line 24

def api_attributes
  {
    "key" => key
  }
end

#api_nameObject



20
21
22
# File 'lib/kongfigure/resources/consumers/key_auth.rb', line 20

def api_name
  "key-auth"
end

#identifierObject



16
17
18
# File 'lib/kongfigure/resources/consumers/key_auth.rb', line 16

def identifier
  key
end

#plugin_allowed?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/kongfigure/resources/consumers/key_auth.rb', line 12

def plugin_allowed?
  false
end