Class: LWS::Auth::Token
- Inherits:
-
Generic::Model
- Object
- Spyke::Base
- Generic::Model
- LWS::Auth::Token
- Defined in:
- lib/lws/apps/auth.rb
Overview
The token class
Instance Attribute Summary collapse
-
#account ⇒ Account
The account the token belongs to (through either the user or the device).
-
#account_id ⇒ Fixnum
The ID of the account the token belongs to.
-
#created_at ⇒ String
readonly
The timestamp of when the token was created.
-
#created_on ⇒ Object
readonly
deprecated
Deprecated.
This is an old alias of #created_at.
-
#device ⇒ Device?
The device the token belongs to.
-
#device_id ⇒ Fixnum?
The ID of the device the token belongs to.
-
#expires_on ⇒ String
The timestamp the token will (or has) expire(d).
-
#id ⇒ Fixnum
readonly
The (unique) ID of the token.
-
#ip_address ⇒ String
The location/IP address the token is used on.
-
#name ⇒ String?
The name of the token.
-
#token ⇒ String
The actual token string.
-
#updated_at ⇒ String
readonly
The timestamp of when the token was last updated.
-
#used_on ⇒ String?
The timestamp the token was last used.
-
#user ⇒ User?
The user the token belongs to.
-
#user_agent ⇒ String?
The user agent/browser string when the token was used.
-
#user_id ⇒ Fixnum?
The ID of the user the token belongs to.
Instance Attribute Details
#account ⇒ Account
Returns the account the token belongs to (through either the user or the device).
402 |
# File 'lib/lws/apps/auth.rb', line 402 belongs_to :account, uri: nil |
#account_id ⇒ Fixnum
Returns the ID of the account the token belongs to.
406 |
# File 'lib/lws/apps/auth.rb', line 406 attribute :account_id |
#created_at ⇒ String (readonly)
Returns the timestamp of when the token was created.
458 |
# File 'lib/lws/apps/auth.rb', line 458 attribute :created_at |
#created_on ⇒ Object (readonly)
This is an old alias of #created_at.
420 |
# File 'lib/lws/apps/auth.rb', line 420 attribute :created_on |
#device ⇒ Device?
Each token is associated to either a user or a device.
Returns the device the token belongs to.
411 |
# File 'lib/lws/apps/auth.rb', line 411 belongs_to :device, uri: nil |
#device_id ⇒ Fixnum?
Returns the ID of the device the token belongs to.
415 |
# File 'lib/lws/apps/auth.rb', line 415 attribute :device_id |
#expires_on ⇒ String
Returns the timestamp the token will (or has) expire(d).
424 |
# File 'lib/lws/apps/auth.rb', line 424 attribute :expires_on |
#id ⇒ Fixnum (readonly)
Returns the (unique) ID of the token.
397 |
# File 'lib/lws/apps/auth.rb', line 397 attribute :id |
#ip_address ⇒ String
Returns the location/IP address the token is used on.
428 |
# File 'lib/lws/apps/auth.rb', line 428 attribute :ip_address |
#name ⇒ String?
Returns the name of the token.
432 |
# File 'lib/lws/apps/auth.rb', line 432 attribute :name |
#token ⇒ String
Returns the actual token string.
436 |
# File 'lib/lws/apps/auth.rb', line 436 attribute :token |
#updated_at ⇒ String (readonly)
Returns the timestamp of when the token was last updated.
462 |
# File 'lib/lws/apps/auth.rb', line 462 attribute :updated_at |
#used_on ⇒ String?
Returns the timestamp the token was last used.
440 |
# File 'lib/lws/apps/auth.rb', line 440 attribute :used_on |
#user ⇒ User?
Each token is associated to either a user or a device.
Returns the user the token belongs to.
450 |
# File 'lib/lws/apps/auth.rb', line 450 belongs_to :user, uri: nil |
#user_agent ⇒ String?
Returns the user agent/browser string when the token was used.
445 |
# File 'lib/lws/apps/auth.rb', line 445 attribute :user_agent |
#user_id ⇒ Fixnum?
Returns the ID of the user the token belongs to.
454 |
# File 'lib/lws/apps/auth.rb', line 454 attribute :user_id |