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



4894
4895
4896
# File 'lib/xberg/native.rb', line 4894

def token
  @token
end

Class Method Details

.from_hash(hash) ⇒ Object



4911
4912
4913
# File 'lib/xberg/native.rb', line 4911

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

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


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

def basic? = false

#bearer?Boolean

Returns:

  • (Boolean)


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

def bearer? = true

#header?Boolean

Returns:

  • (Boolean)


4907
4908
4909
# File 'lib/xberg/native.rb', line 4907

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