struct

KemalIdentity::MFA::Confirmed

Inherits Struct < Value < Object

A factor that has now been proved, and any recovery codes issued along with it.

recovery_codes is non-empty only when this confirmation is what turned MFA on for the account — issuing them at that moment rather than leaving it to the application is deliberate: an account with a second factor and no way around it is one lost phone from being unrecoverable, and "the app was supposed to call regenerate_recovery_codes" is not a defence anybody can offer the person locked out.

The codes are plain text and are stored only as digests. Same rule as above: show them once.

Constructors

new(factor : Factor, recovery_codes : Array(Secret))
Source

Instance methods

factor
Source
inspect(io : IO) : Nil

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"
Source
recovery_codes
Source
to_s(io : IO) : Nil

Same as #inspect(io).

Source