Class: Sessions::EventResource
- Inherits:
-
Madmin::Resource
- Object
- Madmin::Resource
- Sessions::EventResource
- Defined in:
- lib/generators/sessions/templates/madmin/event_resource.rb
Overview
The login trail (sessions gem): append-only record of every login attempt — successful AND failed, with the identity AS TYPED even when no such account exists — plus logouts, revocations and expiries. This is the brute-force / credential-stuffing / account-takeover triage surface:
filter "Failed logins" + sort by occurred_at → tonight's attack
search an email → everything typed against it
search an IP → everything from that address
Events are immutable history; there are no destructive actions here. The kill switch lives on the live session (SessionResource).
Class Method Summary collapse
Class Method Details
.default_sort_column ⇒ Object
75 |
# File 'lib/generators/sessions/templates/madmin/event_resource.rb', line 75 def self.default_sort_column = "occurred_at" |
.default_sort_direction ⇒ Object
76 |
# File 'lib/generators/sessions/templates/madmin/event_resource.rb', line 76 def self.default_sort_direction = "desc" |
.display_name(record) ⇒ Object
71 72 73 |
# File 'lib/generators/sessions/templates/madmin/event_resource.rb', line 71 def self.display_name(record) "#{record.event} · #{record.identity || record.user.try(:email) || "unknown"}" end |