class Procore::Auth::Token

Attributes

access_token[R]
expires_at[R]
refresh_token[R]

Public Class Methods

new(access_token:, refresh_token:, expires_at:) click to toggle source
# File lib/procore/auth/token.rb, line 5
def initialize(access_token:, refresh_token:, expires_at:)
  @access_token = access_token
  @refresh_token = refresh_token
  @expires_at = expires_at
end

Public Instance Methods

expired?() click to toggle source
# File lib/procore/auth/token.rb, line 15
def expired?
  expires_at.to_i < Time.now.to_i
end
invalid?() click to toggle source
# File lib/procore/auth/token.rb, line 11
def invalid?
  access_token.nil?
end