Module: ROM::Auth::Plugins::AuthenticationEventsPlugin::CallbackOverrides

Defined in:
lib/rom/auth/plugins/authentication_events_plugin.rb

Instance Method Summary collapse

Instance Method Details

#on_authentication_completed(data) ⇒ Object



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/rom/auth/plugins/authentication_events_plugin.rb', line 74

def on_authentication_completed(data)
  super

  # ROM.env.command(plugins[AuthenticationEventsPlugin].configuration.table_name).try{
  #   create(data)
  # }
  ROM.env.command(plugins[AuthenticationEventsPlugin].configuration.table_name).create.call(data)

  # TODO
  # - log origin/details & warn user
  # - compute failed logins per minute and alert if above threshold
  # - throttling
  #
end