0.1.26 • Published 4 years ago

@boomid/core v0.1.26

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
4 years ago

version license downloads


Installing

The BoomID Core SDK can be installed via NPM:

npm install --save @boomid/core

or added as a script tag:

<head>
    <script src="https://unpkg.com/@boomid/core"></script>
</head>

Modules

GetDevicePrint

import { GetDevicePrint } from '@boomid/core';

GetDevicePrint()
    .then((response) => {
        console.log('Device Print is: ', response);
    })
    .catch((error) => {
        console.error('An error has occurred: ', error);
    })

Options

You may disable Geolocation collection by setting the disableGeolocation parameter to true. This is beneficial for multiple purposes:

  • Increase speed of gathering a Device Print
  • Disable prompt for the user to approve gathering of location data within the browser
GetDevicePrint({
    disableGeolocation: true // Defaults to false
})

SubmitEvidence

Submit evidence to the BoomID Identity Assurance Engine.

Accepts:

ParameterTypeDefault
applicationstring
site_keystring
device_printobject

Returns:

{
    "message": "string",
    "status": "string",
    "data": {
        "session_id": "uuid"
    }
}

Example:

{
    "message": "Evidence Queued",
    "status": "success",
    "data": {
        "session_id": "8a1caf12-cf8c-422f-9394-fae40876442d"
    }
}

Usage:

import { GetDevicePrint, SubmitEvidence } from '@boomid/core';

GetDevicePrint()
    .then((devicePrint) => {
        return SubmitEvidence({
            application: 'SDK',
            site_key: 'BoomID Site Key',
            device_print: devicePrint
        })
    })

PollResults

Poll the BoomID Identity Assurance Engine for results.

Accepts:

ParameterTypeDefault
intervalMSint500
endpointstring
acceptableScoreint90

Returns:

{
    "status": "string",
    "message": "string",
    "data": {
        "_id": "string",
        "session_id": "uuid",
        "score": "number",
        "recommendation": "string",
        "passed": "boolean"
    }
}

Example:

{
    "status": "success",
    "message": "Response received",
    "data": {
        "_id": "619d37c1a4752e3aabda3808",
        "session_id": "8a1caf12-cf8c-422f-9394-fae40876442d",
        "score": "84",
        "status": "done",
        "recomendation": "suspicious"
    }
}

Usage:

import { GetDevicePrint, SubmitEvidence, PollResults } from '@boomid/core';

GetDevicePrint()
    .then((devicePrint) => {
        return SubmitEvidence({
            application: 'SDK',
            site_key: 'BoomID Site Key',
            device_print: devicePrint
        })
    })
    .then((session_id) => {
        return PollResults({
            intervalMS: 800,
            session_id: session_id,
            acceptableScore: 75
        })
            .then((results) => {
                // Handle results
                if (results.passed) {
                    // Do something good
                } else {
                    // Handle the fraudulent activity
                }
            })
    })
0.1.10

4 years ago

0.1.11

4 years ago

0.1.12

4 years ago

0.1.13

4 years ago

0.1.14

4 years ago

0.1.15

4 years ago

0.1.20

4 years ago

0.1.21

4 years ago

0.1.22

4 years ago

0.1.23

4 years ago

0.1.24

4 years ago

0.1.25

4 years ago

0.1.26

4 years ago

0.1.16

4 years ago

0.1.8

4 years ago

0.1.17

4 years ago

0.1.18

4 years ago

0.1.19

4 years ago

0.1.9

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago