struct

KemalIdentity::MFA::RecoveryCode

Inherits Struct < Value < Object

One single-use recovery code.

Unlike the TOTP secret, this is an ordinary bearer secret — the server only has to recognise it — so it follows the token discipline in docs/02-security-model.md exactly: generated from a CSPRNG, stored as a SHA-256 digest, and consumed atomically so that two simultaneous requests cannot both spend it.

Constructors

new(id : String, account_id : String, code_digest : Bytes, created_at : Time, used_at : Time | Nil = nil)
Source

Instance methods

account_id
Source
code_digest
Source
created_at
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
to_s(io : IO) : Nil

Same as #inspect(io).

Source
used?
Source
used_at
Source