Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@castleio/castle-js

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@castleio/castle-js

Castle Fingerprinting Script

  • 2.0.0-rc.2
  • npm
  • Socket score

Version published
Weekly downloads
67K
decreased by-15.93%
Maintainers
4
Weekly downloads
 
Created
Source

Castle Fingerprinting Script

Packaged version of Castle fingerprinting script.

Introduction

The Castle JavaScript automatically captures every user action in your web application, including clicks, taps, swipes, form submissions, and page views. We use this data to build profiles of good user behavior in order to detect the bad.

Minimal Requirements:

ES3+ version supported browsers eg:

  • Chrome 5+
  • Firefox 3+
  • IE 6+
  • Safari 4+
  • All modern browsers (desktop and mobile)

Installation

npm install --save @castleio/castle-js

Configuration

Basic configuration of the app

import * as Castle from '@castleio/castle-js'

Castle.configure(YOUR_CASTLE_APP_ID);

Advanced configuration of the app

// @param appId [string] castle app id.
// @option options [object] :window (default window) like JSDOM.window
// @option options [boolean] :avoidCookies (default false) when true cookie storage will be avoided
// @option options [string] :cookieDomain (default topLevel domain) cookies domain scope

import * as Castle from '@castleio/castle-js'

Castle.configure(appId, options);

Usage

Getting castle request token

import * as Castle from '@castleio/castle-js'

Castle.createRequestToken().then( (requestToken) => {
  ....
});

See Castle Docs for more information

Upgrade from 1.x

Before

_castle('getClientId')

After (or required to add)

Castle.createRequestToken().then( (requestToken) => {
});
// or
const token = await Castle.createRequestToken();

Changelog

  • 2.0.0 – new script implementation

License

MIT

FAQs

Package last updated on 27 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc