# wx.startSoterAuthentication(Object object)

Start from base library version 1.5.0. Please remaining backward compatible.

with Promise style call: Supported

Mini Program plugin: Not supported

start SOTER Biometric authentication. Please refer to the verification processIntroductions

# parameter

# Object object

attribute type Default values Required Introductions
requestAuthModes Array.&ltstring&gt yes Acceptable means of biometric authentication to be used
challenge string yes Challenge factor. The challenge factor is the string key identifier for the signature prepared by the caller for this biometric, which will be used as the resultJSON For the caller to identify the request. For example, if the scenario is to request user authorization confirmation for an order, you can fill the order number with this parameter.
authContent string '' no Validation description, that is, the dialog box displayed on the interface during the recognition process
success function no Interface calls the successful callback function
fail function no Interface calls failed callback functions
complete function no Interface calls the end of the callback function (call success or failure will be executed)

object.requestAuthModes Legal value

value Introductions Minimum version
fingerPrint Fingerprint identification
facial Face recognition
speech Voiceprint recognition (not yet supported)

# object.success callback

# parameter
# Object res
attribute type Introductions
authMode string Biometric authentication method
resultJSON string Local security information (such as TEE name, version number and anti-playback parameters) obtained in the device security area (TEE) and the authentication information (Android only support, fingerprint ID of this authentication). See below for details
resultJSONSignature string Using SOTER security key pair resultJSON Signature(SHA256 with RSA/PSS, saltlen=20)
errCode number Error code
errMsg string Error message

# resultJSON Introductions

This data is the JSON assembled from incoming challenge and other security information in the device TEE. The following fields are explained in the table below. Examples are:

Field name Introductions
raw Call passed in by caller
In (Android only support) the biometric number of this biometric certification (such as fingerprint identification is the fingerprint information in the internal number of the device)
counter Anti-replay feature parameter
tee_n TEE name (e.g. Qualcomm or trustonic, etc.)
tee_ in TEE version number
fp_n Fingerprint and related logic module providers (such as FPC, etc.)
fp_ in Fingerprint and related module version number
cpu_id Machine Unique Identifier
uid Concept and Android system definition uid, application number
  "raw" : "msg" , 
  "tee_n":"TEE Name",
  "tee_v":"TEE Version",
  "fp_n":"Fingerprint Sensor Name",
  "fp_v":"Fingerprint Sensor Version",
  "cpu_id":"CPU Id",

# sample code

Preview with Developer Tool

   requestAuthModes: ['fingerPrint'],
   challenge: '123456',
   authContent: 'Please unlock it with your fingerprint. '
   success(res) {