class TableauRestApi::Token
Representation of a x_auth_tableau token These tokens have a finite lifespan, the default is 4 hours.
Attributes
expires[R]
value[R]
Public Class Methods
new(token, duration)
click to toggle source
# File lib/tableau_rest_api/util/token.rb, line 7 def initialize(token, duration) @value = token @expires = duration.from_now end
Public Instance Methods
expired?()
click to toggle source
# File lib/tableau_rest_api/util/token.rb, line 12 def expired? @value ? Time.now > @expires : true end