Class: LgPodPlugin::LUserAuthInfo
- Inherits:
-
Object
- Object
- LgPodPlugin::LUserAuthInfo
- Defined in:
- lib/lg_pod_plugin/db/database.rb
Class Method Summary collapse
-
.get_user_id(host) ⇒ Object
创建一个userId.
Instance Method Summary collapse
-
#initialize(id = nil, name = nil, pwd = nil, host = nil, token = nil, refresh_token = nil, time = nil) ⇒ LUserAuthInfo
constructor
A new instance of LUserAuthInfo.
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.
56 57 58 59 60 61 62 63 64 |
# File 'lib/lg_pod_plugin/db/database.rb', line 56 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
67 68 69 70 |
# File 'lib/lg_pod_plugin/db/database.rb', line 67 def self.get_user_id(host) body = host + Dir.home return Digest::MD5.hexdigest(body) end |