By TCell.

TCell Hooks is to be used in conjuction with the tcell_agent to allow for custom event notifications of login failures and login successes.

Getting started

You can add it to your Gemfile with:

gem 'tcell_hooks'

Then run bundle install

There are two options for calling the hooks from your application code:

By providing a Rails request object and having the TCell Agent extract the relevant details from it:

TCellAgent::Hooks::V1::Frameworks::Rails::.(
  TCellAgent::Hooks::V1::::,
  rails_request,
  "user's id",
  user_valid=false
)

Or by providing each individual piece of information required for the TCell event:

TCellAgent::Hooks::V1::.(
  TCellAgent::Hooks::V1::::,
  "users session id",
  "user agent from request",
  "users referrer header",
  "remote address",
  ["array","of","header","names"],
  "users id",
  "document uri",
  user_valid=false
)

The available statuses are:

TCellAgent::Hooks::V1::Login::LOGIN_SUCCESS

TCellAgent::Hooks::V1::Login::LOGIN_FAILURE

Important Note

If the tcell_agent is not installed or if it's disabled, this code will do nothing and should have no performance effect on your app.