module Etwin::Auth::AuthContext

Public Class Methods

deserialize(raw) click to toggle source
# File lib/etwin/auth/_auth_context.rb, line 20
def AuthContext.deserialize(raw)
  type = AuthType.deserialize(raw['type'])
  case type
  when AuthType::AccessToken then AccessTokenAuthContext.deserialize(raw)
  when AuthType::Guest then GuestAuthContext.deserialize(raw)
  when AuthType::User then UserAuthContext.deserialize(raw)
  else T.absurd(type)
  end
end
from_json(json_str) click to toggle source
# File lib/etwin/auth/_auth_context.rb, line 15
def AuthContext.from_json(json_str)
  deserialize JSON.parse(json_str)
end
name() click to toggle source
# File lib/etwin/auth/_auth_context.rb, line 10
def AuthContext.name
  'Etwin::Auth::AuthContext'
end