Class: Crawlberg::AuthConfigBearer
- Inherits:
-
Data
- Object
- Data
- Crawlberg::AuthConfigBearer
- Extended by:
- T::Sig
- Includes:
- AuthConfig
- Defined in:
- lib/crawlberg/native.rb
Overview
Bearer token authentication.
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#token ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
91 92 93 |
# File 'lib/crawlberg/native.rb', line 91 def token @token end |
Class Method Details
.from_hash(hash) ⇒ Object
108 109 110 |
# File 'lib/crawlberg/native.rb', line 108 def self.from_hash(hash) new(token: hash[:token] || hash["token"]) end |
Instance Method Details
#basic? ⇒ Boolean
100 |
# File 'lib/crawlberg/native.rb', line 100 def basic? = false |
#bearer? ⇒ Boolean
102 |
# File 'lib/crawlberg/native.rb', line 102 def bearer? = true |
#header? ⇒ Boolean
104 105 106 |
# File 'lib/crawlberg/native.rb', line 104 def header? = false # @param hash [Hash] deserialized from the native extension # @return [self] |