Class: Arkaan::Authentication::Device

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
lib/arkaan/authentication/device.rb

Overview

A device is a computer or mobile phone from which a user logs in.

Instance Attribute Summary collapse

Instance Attribute Details

#ipString

Returns the IP address of the user.

Returns:

  • (String)

    the IP address of the user



16
# File 'lib/arkaan/authentication/device.rb', line 16

field :ip, type: String

#sessionsArray<Arkaan::Authentication::Session] the sessions this browser is linked to.

Returns Array<Arkaan::Authentication::Session] the sessions this browser is linked to.

Returns:



20
# File 'lib/arkaan/authentication/device.rb', line 20

has_many :sessions, class_name: 'Arkaan::Authentication::Session', inverse_of: :device

#user_agentString

Returns the string representation of the browser and OS of the user.

Returns:

  • (String)

    the string representation of the browser and OS of the user



13
# File 'lib/arkaan/authentication/device.rb', line 13

field :user_agent, type: String