Class: Kreuzcrawl::AuthConfigBasic

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

Overview

HTTP Basic authentication.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#passwordObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



34
35
36
# File 'lib/kreuzcrawl/native.rb', line 34

def password
  @password
end

#usernameObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



34
35
36
# File 'lib/kreuzcrawl/native.rb', line 34

def username
  @username
end

Class Method Details

.from_hash(hash) ⇒ Object



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

def self.from_hash(hash)
  new(username: hash[:username] || hash["username"], password: hash[:password] || hash["password"])
end

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


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

def basic? = true

#bearer?Boolean

Returns:

  • (Boolean)


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

def bearer? = false

#header?Boolean

Returns:

  • (Boolean)


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

def header? = false