Class: Lifen::Authentication

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

Instance Method Summary collapse

Instance Method Details

#refresh_tokenObject



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

def refresh_token
  json = client.post("authentication/api/authenticate/third_party", {accountUuid: user.uuid})

  self.token    = json.first["token"]
end

#register!Object



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

def register!
  json = client.post("authentication/api/register/third_party", {emailAddress: user.email, lastName: user.last_name, firstName: user.first_name})

  self.token    = json["token"]
  self.uuid     = json["accountUuid"]
end