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