Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

asliri-comprehensive-liveness-jquery

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asliri-comprehensive-liveness-jquery

ASLIRI Comprehensive Liveness for HTML + jQuery

latest
npmnpm
Version
2.0.1
Version published
Weekly downloads
6
100%
Maintainers
1
Weekly downloads
 
Created
Source

ASLIRI - COMPREHENSIVE LIVENESS - WEB SDK (jQuery & HTML)

Description

You can verification face and eye with comprehensive liveness by ASLIRI.
The SDK support for HTML

Check out the SDK for a simplified integration.

1. Copy wasm folder to project directory

  • wasm folder provided by ASLIRI
  • copy to yourproject/copyhere...

2. Get your token with ASLIRI Team


3. Install Library if you're not using NPM

library will provided by ASLIRI Team as zip file
you can extract and put 'libs' folder in your project

example: C://webserver/yourproject/libs

sample in index.html :


<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <script src="libs/jquery/dist/jquery.min.js"></script>
        <script type="module" src="libs/asliri-acu-component/face.umd.js"></script>
        <script type="module" src="libs/asliri-acu-component/comprehensive-liveness.umd.js"></script>
        <script type="module" src="libs/asliri-mg-component/index.umd.js"></script>
        <script src="libs/asliri-comprehensive-liveness-jquery/dist/asliri-comprehensive-liveness-sdk.js"></script>
        <style type="text/css">
            body {
                margin: 0;
                padding: 0;
            }
        </style>

        <title>HTML Integration Sample</title>
    </head>

    <body>
        <div id="app">
            <div id="comprehensiveliveness"></div>
        </div>
    </body>

    <script type="text/javascript">
        async function ComprehensiveLivenessInitial() {
            const getAuth = await window.COMPREHENSIVE_SDK.CheckAuthentication(
                "Provided by ASLIRI Team"
            );

            window.COMPREHENSIVE_SDK.ComprehensiveLiveness(
                getAuth,
                (result) => {
                    // your code for handle result
                    // result.message = message response
                    // result.score = score liveness 0 to 1
                    // result.image = image base64
                    console.log({ result });
                },
                (error) => {
                    // your code for handle error
                    console.log({ error });
                }
            );
        }

        // run comprehensive liveness
        ComprehensiveLivenessInitial();
    </script>
</html>




4. Install Library if you're using NPM

npm i asliri-comprehensive-liveness-jquery --save

sample in index.html :


<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <script src="node_modules/jquery/dist/jquery.min.js"></script>
        <script type="module" src="node_modules/asliri-acu-component/face.umd.js"></script>
        <script type="module" src="node_modules/asliri-acu-component/comprehensive-liveness.umd.js"></script>
        <script type="module" src="node_modules/asliri-mg-component/index.umd.js"></script>
        <script src="node_modules/asliri-comprehensive-liveness-jquery/dist/asliri-comprehensive-liveness-sdk.js"></script>
        <style type="text/css">
            body {
                margin: 0;
                padding: 0;
            }
        </style>

        <title>HTML Integration Sample</title>
    </head>

    <body>
        <div id="app">
            <div id="comprehensiveliveness"></div>
        </div>
    </body>

    <script type="text/javascript">
        async function ComprehensiveLivenessInitial() {
            const getAuth = await window.COMPREHENSIVE_SDK.CheckAuthentication(
                "Provided by ASLIRI Team"
            );

            window.COMPREHENSIVE_SDK.ComprehensiveLiveness(
                getAuth,
                (result) => {
                    // your code for handle result
                    // result.message = message response
                    // result.score = score liveness 0 to 1
                    // result.image = image base64
                    console.log({ result });
                },
                (error) => {
                    // your code for handle error
                    console.log({ error });
                }
            );
        }

        // run comprehensive liveness
        ComprehensiveLivenessInitial();
    </script>
</html>



Note: result score from 0 to 1 (you can manage the score)

Thank you.

Keywords

asliri

FAQs

Package last updated on 08 Mar 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