Class: Supabase::Auth::Types::AuthMFAEnrollResponse
- Inherits:
-
Struct
- Object
- Struct
- Supabase::Auth::Types::AuthMFAEnrollResponse
- Defined in:
- lib/supabase/auth/types.rb
Overview
MFA Enroll response - returned when enrolling a new TOTP factor
Instance Attribute Summary collapse
-
#friendly_name ⇒ Object
Returns the value of attribute friendly_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#totp ⇒ Object
Returns the value of attribute totp.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Attribute Details
#friendly_name ⇒ Object
Returns the value of attribute friendly_name
270 271 272 |
# File 'lib/supabase/auth/types.rb', line 270 def friendly_name @friendly_name end |
#id ⇒ Object
Returns the value of attribute id
270 271 272 |
# File 'lib/supabase/auth/types.rb', line 270 def id @id end |
#phone ⇒ Object
Returns the value of attribute phone
270 271 272 |
# File 'lib/supabase/auth/types.rb', line 270 def phone @phone end |
#totp ⇒ Object
Returns the value of attribute totp
270 271 272 |
# File 'lib/supabase/auth/types.rb', line 270 def totp @totp end |
#type ⇒ Object
Returns the value of attribute type
270 271 272 |
# File 'lib/supabase/auth/types.rb', line 270 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/supabase/auth/types.rb', line 278 def self.from_hash(hash) return nil if hash.nil? totp = hash["totp"] || hash[:totp] totp_struct = totp ? MFATotpInfo.new(qr_code: totp["qr_code"] || totp[:qr_code], secret: totp["secret"] || totp[:secret], uri: totp["uri"] || totp[:uri]) : nil new( id: hash["id"] || hash[:id], type: hash["type"] || hash[:type], friendly_name: hash["friendly_name"] || hash[:friendly_name], totp: totp_struct, phone: hash["phone"] || hash[:phone] ) end |