Class: Dexcom::Authentication

Inherits:
Object
  • Object
show all
Includes:
Utils::HTTPartyConfigured
Defined in:
lib/dexcom/authentication.rb

Class Method Summary collapse

Class Method Details

.access_tokenObject



10
11
12
13
14
# File 'lib/dexcom/authentication.rb', line 10

def access_token
  refresh_access_token if @access_token.nil?

  @access_token
end

.renew_authenticationObject



23
24
25
26
27
28
29
# File 'lib/dexcom/authentication.rb', line 23

def renew_authentication
  @access_token = nil
  @session_id = nil

  refresh_access_token
  refresh_session_id
end

.session_idObject



16
17
18
19
20
21
# File 'lib/dexcom/authentication.rb', line 16

def session_id
  refresh_access_token unless auth_started?
  refresh_session_id if @session_id.nil?

  @session_id
end