Class: Kreuzcrawl::AuthConfigBearer

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

Overview

Bearer token authentication.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#tokenObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



57
58
59
# File 'lib/kreuzcrawl/native.rb', line 57

def token
  @token
end

Class Method Details

.from_hash(hash) ⇒ Object



73
74
75
# File 'lib/kreuzcrawl/native.rb', line 73

def self.from_hash(hash)
  new(token: hash[:token] || hash["token"])
end

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


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

def basic? = false

#bearer?Boolean

Returns:

  • (Boolean)


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

def bearer? = true

#header?Boolean

Returns:

  • (Boolean)


69
70
71
# File 'lib/kreuzcrawl/native.rb', line 69

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