Class: LgPodPlugin::LUserAuthInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/lg_pod_plugin/database.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id = nil, name = nil, pwd = nil, host = nil, token = nil, refresh_token = nil, time = nil) ⇒ LUserAuthInfo

Returns a new instance of LUserAuthInfo.



61
62
63
64
65
66
67
68
69
# File 'lib/lg_pod_plugin/database.rb', line 61

def initialize(id = nil, name = nil, pwd = nil, host = nil, token = nil, refresh_token = nil, time = nil)
  self.id = id
  self.host = host
  self.password = pwd
  self.username = name
  self.expires_in = time
  self.access_token = token
  self.refresh_token = refresh_token
end

Class Method Details

.get_user_id(host) ⇒ Object

创建一个userId



72
73
74
75
# File 'lib/lg_pod_plugin/database.rb', line 72

def self.get_user_id(host)
  body = host + Dir.home
  return Digest::MD5.hexdigest(body)
end