class Aptible::CLI::Helpers::SecurityKey::ThrottledAuthenticator

Attributes

pid[R]

Public Class Methods

new(auth, pid) click to toggle source
# File lib/aptible/cli/helpers/security_key.rb, line 46
def initialize(auth, pid)
  @auth = auth
  @pid = pid
end
spawn(auth) click to toggle source
# File lib/aptible/cli/helpers/security_key.rb, line 55
def self.spawn(auth)
  pid = Process.spawn(
    'sleep', '2',
    in: :close, out: :close, err: :close,
    close_others: true
  )

  U2F_LOGGER.debug("#{self} #{auth.key_handle}: spawned #{pid}")

  new(auth, pid)
end

Public Instance Methods

exited(_status) click to toggle source
# File lib/aptible/cli/helpers/security_key.rb, line 51
def exited(_status)
  [Authenticator.spawn(@auth), nil]
end