Class: DomoscioAdmin::AuthorizationToken::ManualSetting

Inherits:
Object
  • Object
show all
Defined in:
lib/domoscio_admin/authorization_token.rb

Overview

Manages tokens with configuration

Instance Method Summary collapse

Instance Method Details

#getObject



18
19
20
21
22
23
# File 'lib/domoscio_admin/authorization_token.rb', line 18

def get
  {
    access_token: DomoscioAdmin.configuration.access_token,
    refresh_token: DomoscioAdmin.configuration.refresh_token
  }
end

#store(token) ⇒ Object



25
26
27
28
# File 'lib/domoscio_admin/authorization_token.rb', line 25

def store(token)
  DomoscioAdmin.configuration.access_token = token[:access_token]
  DomoscioAdmin.configuration.refresh_token = token[:refresh_token]
end