1.0.1 • Published 5 years ago

@littlebluefox/littlebluefox-nodejs v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

Installation

$ npm install @littlebluefox/littlebluefox-nodejs

Usage

const littlebluefox = require('@littlebluefox/littlebluefox-nodejs');

const lbfClient = littlebluefox.makeClient(accessToken);

var event = {
  event_type: 'authentication_success', # event type
  uref: '...',      # user id, or sha256(user.id), or another string
  email: '...',     # user email
  remote_ip: '...', # current user ip
  http_headers: {
    'User-Agent': '...'
  }
};

lbfClient
  .push(event)
  .then(() => {
    console.log('security event sent');
  })
  .catch((err) => {
    console.error(err);
  });
1.0.1

5 years ago

1.0.0

5 years ago