Class: Kreuzcrawl::AuthConfigHeader

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
AuthConfig
Defined in:
lib/kreuzcrawl/native.rb

Overview

Custom authentication header.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



78
79
80
# File 'lib/kreuzcrawl/native.rb', line 78

def name
  @name
end

#valueObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



78
79
80
# File 'lib/kreuzcrawl/native.rb', line 78

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



97
98
99
# File 'lib/kreuzcrawl/native.rb', line 97

def self.from_hash(hash)
  new(name: hash[:name] || hash["name"], value: hash[:value] || hash["value"])
end

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


89
# File 'lib/kreuzcrawl/native.rb', line 89

def basic? = false

#bearer?Boolean

Returns:

  • (Boolean)


91
# File 'lib/kreuzcrawl/native.rb', line 91

def bearer? = false

#header?Boolean

Returns:

  • (Boolean)


93
94
95
# File 'lib/kreuzcrawl/native.rb', line 93

def header? = true
# @param hash [Hash] deserialized from the native extension
# @return [self]