Coherence v0.5.1 Coherence.TrackableService
Trackable tracks login information for each login.
You have two choices to track logins.
- Add trackable fields to your user schema.
- Create a separate trackable table.
User Schema Trackable Fields
Use the --trackable
installation option to enable this feature.
Trackable adds the following fields to the user schema:
- :sign_in_count - Increments each time a user logs in.
- :current_sign_in_at - The time and date the user logged in.
- :current_sign_in_ip - The IP address of the logged in user.
- :last_sign_in_at: last_at - The previous login time and date
- :last_sign_in_ip: last_ip - The previous login IP address
Trackable Table
This feature provides full audit capability around user logins.
Use the --trackable-table installation option to use a separate trackable table/schema.
Trackable-table creates a Trackable schema with the following fields:
* :action - The action that generated the entry. Values are
:login, :logout, :password_reset, :failed_login, :lock, :unlock, :unlock_token* :sign_in_count - Increments each time a user logs in.
* :current_sign_in_at - The time and date the user logged in.
* :current_sign_in_ip - The IP address of the logged in user.
* :last_sign_in_at: last_at - The previous login time and date
* :last_sign_in_ip: last_ip - The previous login IP address
Note, the
—trackableand
—trackable-table` installation options are
mutually exclusive.
Link to this section Summary
Link to this section Types
Link to this section Functions
Track user login details.
Saves the ip address and timestamp when the user logs in.
A value of true in the third argument indicates that the :trackable option
is configured. A Value of true in the fourth argument indicates that the
:trackable_table
is configured.
Track user logout.
Updates the last_sign_in_at
and last_sign_in_at
fields. Clears the
‘current_sign_in_atand current_sign_in_ip' fields.
A value of true in the third argument indicates that the
:trackable optionis configured. A Value of true in the fourth argument indicates that the
:trackable_table` is configured.