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



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

def token
  @token
end

Class Method Details

.from_hash(hash) ⇒ Object



84
85
86
# File 'lib/kreuzcrawl/native.rb', line 84

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

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


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

def basic? = false

#bearer?Boolean

Returns:

  • (Boolean)


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

def bearer? = true

#header?Boolean

Returns:

  • (Boolean)


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

def header? = false