SecureNative.SDK 1.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package SecureNative.SDK --version 1.0.5
NuGet\Install-Package SecureNative.SDK -Version 1.0.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SecureNative.SDK" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SecureNative.SDK --version 1.0.5
#r "nuget: SecureNative.SDK, 1.0.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SecureNative.SDK as a Cake Addin
#addin nuget:?package=SecureNative.SDK&version=1.0.5

// Install SecureNative.SDK as a Cake Tool
#tool nuget:?package=SecureNative.SDK&version=1.0.5

SecureNative Node SDK

Installation

Add the @securenative/sdk package to your package.json.

npm i @securenative/sdk

Configuration

import { SecureNative } from '@securenative/sdk';

const secureNative = new SecureNative({ apiKey: 'YOUR_API_KEY' });
Option Type Optional Default Value Description
apiKey string false none SecureNative api key
apiUrl string true https://api.securenative.com/v1/collector Default api base address
interval number true 1000 Default interval for SDK to try to persist events
maxEvents number true 1000 Max in-memory events queue
timeout number true 1500 API call timeout in ms
autoSend Boolean true true Should api auto send the events
debugMode Boolean true false Displays logging to standard output

Event tracking

import { SecureNative, EventTypes } from '@securenative/sdk';
or
const { SecureNative, EventTypes } = require('@securenative/sdk'); // if your using ES5

const secureNative = new SecureNative('YOUR_API_KEY', { // optionally pass params here  });

secureNative.track({
    eventType: EventTypes.LOG_IN,
    ip: '127.0.0.1',
    userAgent: 'Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405',
    user: {
      id: '12345'
    }
}, req);

WebHook

Use verifyWebhook middleware to ensure that webhook is comming from SecureNative

app.post("/securewebhook", securenative.middleware.verifyWebhook, (req, res) => {

}
Product Compatible and additional computed target framework versions.
.NET Framework net35 is compatible.  net40 was computed.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 529 11/11/2019
1.0.5 461 8/26/2019
1.0.4 446 8/26/2019
1.0.3 464 8/21/2019
1.0.2 469 8/4/2019
1.0.1 494 7/30/2019
1.0.0 476 7/25/2019

First test version