Method: ROTP::TOTP#at

Defined in:
lib/rotp/totp.rb

#at(time) ⇒ Object

Accepts either a Unix timestamp integer or a Time object. Time objects will be adjusted to UTC automatically

Parameters:

  • time (Time/Integer)

    the time to generate an OTP for, integer unix timestamp or Time object



17
18
19
# File 'lib/rotp/totp.rb', line 17

def at(time)
  generate_otp(timecode(time))
end