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

fingerprint-scanner

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fingerprint-scanner

Capture fingerprint from IB manufactured devices

  • 1.0.18
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

fingerprint-scanner

Why?

fingerprint-scanner makes streaming and capturing fingerprint easier for JavaScript developers by taking the hassle out of working with finding device port streaming and capturing.

  • Finds available port which the fingerprint SDK is currently running.

  • Stream fingerprint and makes available for caputure (it helps to visualize the streaming).

  • Captures and returns fingerprint data in a base64 format.

  • More details are available here: MDS-Specification



Installation

In a node.js environment:

npm i fingerprint-scanner

Usage

  • Add config.js in root folder and add the following
export const DEVICE_DISC_METHOD = "MOSIPDISC";
export const DEVICE_DISC_TYPE = "Finger";
export const IP = "http://localhost";
export const STREAM_TIMEOUT = '10000'
export const DEVICE_ID = '1'
export const DEVICE_SUB_ID = '1'
export const CAPTURE_BODY = {
  env: 'Production',
  purpose: 'Registration',
  specVersion: '0.9.5',   
  captureTime: new Date().toISOString(),
  domainUri: '127.0.0.1:4503',
  timeout: '30000',
  transactionId: '1',
  bio: [
    {
      type: 'Finger',
      count: 1,
      bioSubType: ["Left IndexFinger"],
      requestedScore: '10',
      deviceId: '1',
      deviceSubId: 1,
      previousHash: '',
      exception: ["Left MiddleFinger", "Left RingFinger", "Left LittleFinger"],
    },
  ],
}

import fingerprint from 'fingerprint-scanner'

const data = fingerprint();

// if successful, data will be returned in a base64 format

There are two requests that run in the background and stream, and capture and the config.js file contains the payloads for the two requests.

  • stream
{
  "deviceId": "Internal Id",
  "deviceSubId": "Specific device sub Id",
  "timeout": "Timeout for stream"
}
  • capture
{
  "env":  "Target environment",
  "purpose": "Auth or Registration",
  "specVersion": "Expected MDS spec version",
  "timeout": "Timeout for registration capture",
  "captureTime": "Time of capture request in ISO format",
  "transactionId": "Transaction Id for the current capture",
  "bio": [
    {
      "type": "Type of the biometric data",
      "count":  "Finger/Iris count, in case of face max, is set to 1",
      "bioSubType": ["Array of subtypes"], //Optional
      "exception": ["Finger or Iris to be excluded"],
      "requestedScore": "Expected quality score that should match to complete a successful capture",
      "deviceId": "Internal Id",
      "deviceSubId": "Specific device Id",
      "previousHash": "Hash of the previous block"
    }
  ],
  "customOpts": {
    //max of 50 key-value pairs. This is so that vendor-specific parameters can be sent if necessary. The values cannot be hardcoded and have to be configured by the apps server and should be modifiable upon need by the applications. Vendors are free to include additional parameters and fine-tuning parameters. None of these values should go undocumented by the vendor. No sensitive data should be available in the customOpts.
  }
}

So the ``

To do it manually:

import { findPort, stream, capture } from 'fingerprint scanner';

const devicePort = findPort();

async function scan() {
    stream({devicePort});
    await data = capture({devicePort});
    return data;
}

Keywords

FAQs

Package last updated on 02 May 2024

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