0.1.26 • Published 2 years ago

@boomid/core v0.1.26

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
2 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

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.1.20

2 years ago

0.1.21

2 years ago

0.1.22

2 years ago

0.1.23

2 years ago

0.1.24

2 years ago

0.1.25

2 years ago

0.1.26

2 years ago

0.1.16

2 years ago

0.1.8

2 years ago

0.1.17

2 years ago

0.1.18

2 years ago

0.1.19

2 years ago

0.1.9

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago