Class: Xberg::AuthConfigBearer

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
AuthConfig
Defined in:
lib/xberg/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



4288
4289
4290
# File 'lib/xberg/native.rb', line 4288

def token
  @token
end

Class Method Details

.from_hash(hash) ⇒ Object



4304
4305
4306
# File 'lib/xberg/native.rb', line 4304

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

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


4296
# File 'lib/xberg/native.rb', line 4296

def basic? = false

#bearer?Boolean

Returns:

  • (Boolean)


4298
# File 'lib/xberg/native.rb', line 4298

def bearer? = true

#header?Boolean

Returns:

  • (Boolean)


4300
4301
4302
# File 'lib/xberg/native.rb', line 4300

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