Class: Supabase::Auth::Types::AuthMFAChallengeResponse

Inherits:
Struct
  • Object
show all
Defined in:
lib/supabase/auth/types.rb

Overview

MFA Challenge response

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#expires_atObject

Returns the value of attribute expires_at

Returns:

  • (Object)

    the current value of expires_at



299
300
301
# File 'lib/supabase/auth/types.rb', line 299

def expires_at
  @expires_at
end

#factor_typeObject

Returns the value of attribute factor_type

Returns:

  • (Object)

    the current value of factor_type



299
300
301
# File 'lib/supabase/auth/types.rb', line 299

def factor_type
  @factor_type
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



299
300
301
# File 'lib/supabase/auth/types.rb', line 299

def id
  @id
end

Class Method Details

.from_hash(hash) ⇒ Object



305
306
307
308
309
310
311
312
313
# File 'lib/supabase/auth/types.rb', line 305

def self.from_hash(hash)
  return nil if hash.nil?

  new(
    id: hash["id"] || hash[:id],
    factor_type: hash["factor_type"] || hash[:factor_type] || hash["type"] || hash[:type],
    expires_at: hash["expires_at"] || hash[:expires_at]
  )
end