跳到主要内容

面部注册和 1:1 验证

注册

要将用户的面部与其 CPF 关联注册,需要在 .setDocumentNumber() 函数的 documentNumber 参数中填写该用户的 CPF,并且在 SDK 构造函数中将 .setValidation() 函数的 shouldValidate 参数设置为 false,或者不调用 .setValidation() 函数。请查看以下注册示例:

<script>
var hostComponent = document.getElementById('webfacerecon')
var webFaceRecon = new ZaigWebFaceRecon.WebFaceRecon(hostComponent)
... Outras configurações
.setDocumentNumber('000.000.000-00')
//.setValidation(false) a função setValidation não deve ser utilizada ou utilizada com o parâmetro false
.build()
<script/>

1:1 验证 - Face Match

要使用 **1:1 验证(Face Match)**功能,需要在 SDK 构造函数中将 shouldValidate 参数设置为 true。这应通过调用 .setValidation() 方法来完成。此外,.setDocumentNumber() 函数的 documentNumber 参数需要填写已预先注册面部的用户的 CPF。请查看以下验证示例:

<script>
var hostComponent = document.getElementById('webfacerecon')
var webFaceRecon = new ZaigWebFaceRecon.WebFaceRecon(hostComponent)
... Outras configurações
.setDocumentNumber('000.000.000-00')
.setValidation(true)
.build()
<script/>

注意: 1:1 验证只能在用户的第二次会话起使用,即在第一次会话之后,当 documentNumber 参数填写了用户 CPF 且 validation 参数为 false 时,需要有记录才能进行验证。

旧版本

重要提示!

3.0.0 之前的版本需要在 WebFaceRecon 构造函数中传递 mobileToken。

使用示例

<script>
var hostComponent = document.getElementById('webfacerecon')
var webFaceRecon = new ZaigWebFaceRecon.WebFaceRecon(
hostComponent,
'YOUR_TOKEN_SENT_BY_QITECH'
)
... Outras configurações
<script/>