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



4534
4535
4536
# File 'lib/xberg/native.rb', line 4534

def token
  @token
end

Class Method Details

.from_hash(hash) ⇒ Object



4551
4552
4553
# File 'lib/xberg/native.rb', line 4551

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

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


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

def basic? = false

#bearer?Boolean

Returns:

  • (Boolean)


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

def bearer? = true

#header?Boolean

Returns:

  • (Boolean)


4547
4548
4549
# File 'lib/xberg/native.rb', line 4547

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