uni.startSoterAuthentication(options)
开始 SOTER 生物认证
startSoterAuthentication 兼容性
Web | 微信小程序 | Android | iOS | HarmonyOS |
x | 4.41 | x | x | 4.61 |
参数
名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |
options | StartSoterAuthenticationOptions | 是 | - | - | - |
名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 | requestAuthModes | Array<'fingerPrint' | 'facial' | 'speech'> | 是 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 请求使用的可接受的生物认证方式 | challenge | string | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 挑战因子 | authContent | string | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 验证描述,即识别过程中显示在界面上的对话框提示内容 | success | (result: StartSoterAuthenticationSuccess) => void | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用成功的回调函数 | fail | (result: UniError) => void | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用失败的回调函数 | complete | (result: any) => void | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用结束的回调函数(调用成功、失败都会执行) |
|
StartSoterAuthenticationSuccess 的属性值
名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |
errCode | number | 是 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 错误码 |
authMode | string | 是 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 生物认证方式 |
合法值 | 兼容性 | 描述 | fingerPrint | - | 指纹识别 | facial | - | 人脸识别 | speech | - | 声纹识别(暂未支持) |
|
resultJSON | string | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 在设备安全区域(TEE)内获得的本机安全信息以及本次认证信息 |
resultJSONSignature | string | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 用SOTER安全密钥对 resultJSON 的签名(SHA256 with RSA/PSS, saltlen=20) |
errMsg | string | 是 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用结果 |
参见
uni.checkIsSupportSoterAuthentication(options)
获取本机支持的 SOTER 生物认证方式
checkIsSupportSoterAuthentication 兼容性
Web | 微信小程序 | Android | iOS | HarmonyOS |
x | 4.41 | x | x | 4.61 |
参数
名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |
options | CheckIsSupportSoterAuthenticationOptions | 是 | - | - | - |
名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 | success | (result: CheckIsSupportSoterAuthenticationSuccess) => void | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用成功的回调函数 | fail | (result: UniError) => void | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用失败的回调函数 | complete | (result: any) => void | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用结束的回调函数(调用成功、失败都会执行) |
|
CheckIsSupportSoterAuthenticationSuccess 的属性值
名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |
supportMode | Array<'fingerPrint' | 'facial' | 'speech'> | 是 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用成功的回调函数 |
errMsg | string | 是 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用结果 |
参见
uni.checkIsSoterEnrolledInDevice(options)
获取设备内是否录入如指纹等生物信息
checkIsSoterEnrolledInDevice 兼容性
Web | 微信小程序 | Android | iOS | HarmonyOS |
x | 4.41 | x | x | 4.61 |
参数
名称 | 类型 | 必填 | 默认值 | 兼容性 | 描述 |
options | CheckIsSoterEnrolledInDeviceOptions | 是 | - | - | - |
名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 | checkAuthMode | string | 是 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 生物认证方式 | 合法值 | 兼容性 | 描述 | fingerPrint | - | 指纹识别 | facial | - | 人脸识别 | speech | - | 声纹识别(暂未支持) |
| success | (result: CheckIsSoterEnrolledInDeviceSuccess) => void | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用成功的回调函数 | fail | (result: UniError) => void | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用失败的回调函数 | complete | (result: any) => void | 否 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 接口调用结束的回调函数(调用成功、失败都会执行) |
|
CheckIsSoterEnrolledInDeviceSuccess 的属性值
名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |
isEnrolled | boolean | 是 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 是否已录入信息 |
errMsg | string | 是 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 错误信息 |
参见
示例
hello uni-app x
该 API 不支持 Web,请运行 hello uni-app x 到 App 平台体验
通用类型
GeneralCallbackResult
名称 | 类型 | 必备 | 默认值 | 兼容性 | 描述 |
errMsg | string | 是 | - |
Web
|
微信小程序
|
Android
|
iOS
|
HarmonyOS
| - | 4.41 | - | - | - |
| 错误信息 |