Class: LWS::Auth::Token

Inherits:
Generic::Model show all
Defined in:
lib/lws/apps/auth.rb

Overview

The token class

Instance Attribute Summary collapse

Attributes inherited from Generic::Model

#created_at, #id, #updated_at, #url, #url_html

Method Summary

Methods inherited from Generic::Model

#deep_dup, #dig, #reload, #rollback, #save

Instance Attribute Details

#accountAccount



335
# File 'lib/lws/apps/auth.rb', line 335

belongs_to :account, uri: nil

#account_idInteger



339
# File 'lib/lws/apps/auth.rb', line 339

attribute :account_id

#created_onObject (readonly)

Deprecated.

This is an old alias of Generic::Model#created_at.



353
# File 'lib/lws/apps/auth.rb', line 353

attribute :created_on

#deviceDevice?

Note:

Each token is associated to either a user or a device.

Returns the device the token belongs to.



344
# File 'lib/lws/apps/auth.rb', line 344

belongs_to :device, uri: nil

#device_idInteger?



348
# File 'lib/lws/apps/auth.rb', line 348

attribute :device_id

#expires_onString



357
# File 'lib/lws/apps/auth.rb', line 357

attribute :expires_on

#ip_addressString



361
# File 'lib/lws/apps/auth.rb', line 361

attribute :ip_address

#nameString?



365
# File 'lib/lws/apps/auth.rb', line 365

attribute :name

#tokenString



369
# File 'lib/lws/apps/auth.rb', line 369

attribute :token

#used_onString?



373
# File 'lib/lws/apps/auth.rb', line 373

attribute :used_on

#userUser?

Note:

Each token is associated to either a user or a device.

Returns the user the token belongs to.



383
# File 'lib/lws/apps/auth.rb', line 383

belongs_to :user, uri: nil

#user_agentString?



378
# File 'lib/lws/apps/auth.rb', line 378

attribute :user_agent

#user_idInteger?



387
# File 'lib/lws/apps/auth.rb', line 387

attribute :user_id