未验证 提交 8218997a 编写于 作者: O openharmony_ci 提交者: Gitee

!23957 用户IAM,ArkTs整改闭环

Merge pull request !23957 from liuziwei/master
......@@ -1374,7 +1374,7 @@ auth.auth(challenge, userIAM_userAuth.UserAuthType.FACE, userIAM_userAuth.AuthTr
console.info('auth onResult error = ' + e);
}
},
onAcquireInfo: (module, acquire, extraInfo) => {
onAcquireInfo: (module, acquire, extraInfo : userIAM_userAuth.AuthResult) => {
try {
console.info('auth onAcquireInfo module = ' + module);
console.info('auth onAcquireInfo acquire = ' + acquire);
......@@ -1591,12 +1591,14 @@ execute(type : AuthType, level : SecureLevel): Promise<number>
```js
import userIAM_userAuth from '@ohos.userIAM.userAuth';
let authenticator = userIAM_userAuth.getAuthenticator();
authenticator.execute('FACE_ONLY', 'S2').then((code)=>{
try {
let authenticator = userIAM_userAuth.getAuthenticator();
authenticator.execute('FACE_ONLY', 'S2').then((code)=>{
console.info('auth success');
}).catch((error)=>{
})
} catch (error) {
console.error('auth fail, code = ' + error);
});
}
```
## AuthenticationResult<sup>(deprecated)</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册