class Etwin::Client::Auth
Eternal-Twin client authentication data
Constants
- Guest
Attributes
Public Class Methods
from_token(key)
click to toggle source
# File lib/etwin/client/auth.rb, line 60 def from_token(key) new("Bearer #{key}") end
new(authorization_header)
click to toggle source
# File lib/etwin/client/auth.rb, line 17 def initialize(authorization_header) @authorization_header = T.let(authorization_header, T.nilable(String)) freeze end
Public Instance Methods
==(other)
click to toggle source
# File lib/etwin/client/auth.rb, line 23 def ==(other) case other when Auth @authorization_header == other.authorization_header else false end end
hash()
click to toggle source
# File lib/etwin/client/auth.rb, line 33 def hash [@authorization_header].hash end
inspect()
click to toggle source
# File lib/etwin/client/auth.rb, line 38 def inspect PP.singleline_pp(self, String.new) end
pretty_print(pp)
click to toggle source
# File lib/etwin/client/auth.rb, line 43 def pretty_print(pp) pp.group(0, "#{self.class.name}(", ')') do pp.nest 1 do pp.breakable '' pp.text 'authorization_header=' pp.pp @authorization_header end pp.breakable '' end end