Class: Dexcom::Authentication

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

Class Method Summary collapse

Class Method Details

.access_tokenObject



8
9
10
11
12
# File 'lib/dexcom/authentication.rb', line 8

def access_token
  refresh_access_token if @access_token.nil?

  @access_token
end

.renew_authenticationObject



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

def renew_authentication
  @access_token = nil
  @session_id = nil

  refresh_access_token
  refresh_session_id
end

.session_idObject



14
15
16
17
18
19
# File 'lib/dexcom/authentication.rb', line 14

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

  @session_id
end