Class: Crawlberg::AuthConfigBasic
- Inherits:
-
Data
- Object
- Data
- Crawlberg::AuthConfigBasic
- Extended by:
- T::Sig
- Includes:
- AuthConfig
- Defined in:
- lib/crawlberg/native.rb
Overview
HTTP Basic authentication.
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
-
#username ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#password ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
65 66 67 |
# File 'lib/crawlberg/native.rb', line 65 def password @password end |
#username ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
65 66 67 |
# File 'lib/crawlberg/native.rb', line 65 def username @username end |
Class Method Details
.from_hash(hash) ⇒ Object
86 87 88 |
# File 'lib/crawlberg/native.rb', line 86 def self.from_hash(hash) new(username: hash[:username] || hash["username"], password: hash[:password] || hash["password"]) end |
Instance Method Details
#basic? ⇒ Boolean
78 |
# File 'lib/crawlberg/native.rb', line 78 def basic? = true |
#bearer? ⇒ Boolean
80 |
# File 'lib/crawlberg/native.rb', line 80 def bearer? = false |
#header? ⇒ Boolean
82 83 84 |
# File 'lib/crawlberg/native.rb', line 82 def header? = false # @param hash [Hash] deserialized from the native extension # @return [self] |