Sha256: 8f24703193992854c498809e5ee1dca27e74cf1502bae604f78cdc7b29c6a672
Contents?: true
Size: 416 Bytes
Versions: 12
Compression:
Stored size: 416 Bytes
Contents
module VoiceBase class Client::Token attr_accessor :token, :created_at, :timeout def initialize(token, timeout = Float::INFINITY) raise VoiceBase::AuthenticationError, "Authentication token cannot be empty" unless token @token = token @created_at = Time.now @timeout = timeout end def expired? Time.now > created_at + (timeout / 1000.to_f) end end end
Version data entries
12 entries across 12 versions & 1 rubygems