Quick start
Getting started with neomia Pulse API. This example use a web application using JavaScript and a web server written in Python.
Code examples are limited to several programming languages
Only several programming languages are used in the implementation examples. You can use the structures and mechanisms presented to implements clients in other languages.
Frontend (HTML / JavaScript)¶
You can download the frontend client libraries here : JavaScript Libs.
First, you need to capture data needed by Pulse API from user. Considering a login form, you will have to instance the Pulse Biometric Recorder (PBR) :
Include the script in your HTML page :
1 2 3 | |
Instantiate the neomia Pulse BiometricPass in a javascript file :
1 | |
Then, add your custom event to get the typing pattern :
1 2 3 4 5 | |
Next, when you are ready to capture the keystroke dynamics, display the biometrics pass :
1 | |
Finally, you have to send it to your backend web server :
1 2 3 4 5 6 7 8 | |
Backend (Python)¶
The backend is the link between the frontend that collect biometric data and Pulse API services. In this example, we send directly the received pattern to the Rest API :
1 2 3 4 5 6 7 8 9 | |
Then you receive an authentication response from Pulse API, and you can use the result to authenticate, not authenticate or ask another authentication factor according to your authentication policy :
1 2 3 4 | |
If the recommended_action is auth, the user is authenticated by Pulse !
Error handling is missing
This is a very simple example to illustrate the implementation of Pulse services. User authentication is a critical process, thus you have to add error handling :
- Missing or malformed data sended by the frontend client.
- Error from Pulse API. The service can be temporarily unavailable.
You will learn more about the implementation by visiting Pulse API Endpoints and JavaScript Libraries.