fix docs bug

Signed-off-by: https://gitee.com/WALL_EYE <wangguoqiang12@huawei.com>
Change-Id: Ie2152781ea8a4bc9c466307921b5886bb6f4637f
上级 aff49d2e
......@@ -38,11 +38,9 @@ userIAM_userAuth模块提供了用户认证的相关方法,包括获取认证
```js
let authenticator = userIAM_userAuth.getAuthenticator();
authenticator.execute("FACE_ONLY", "S2").then((code)=>{
authenticator.off("tip", tipCallback);
authenticator.execute("FACE_ONLY", "S2").then((code) => {
console.info("auth success");
}).catch((code)=>{
authenticator.off("tip", tipCallback);
}).catch((code) => {
console.error("auth fail, code = " + code);
});
```
......@@ -93,11 +93,12 @@ userIAM_userAuth模块提供了用户认证的相关方法,包括检测认证
5. 认证过程中取消认证,代码示例如下:
```js
let auth = new userIAM_userAuth.UserAuth();
// contextId通过auth接口获取
let contextId = auth.auth(null, userIAM_userAuth.UserAuthType.FACE, userIAM_userAuth.AuthTrustLevel.ATL1, {
onResult: (result, extraInfo) => {
console.info("auth onResult result = " + result);
},
},
onAcquireInfo: (module, acquire, extraInfo) => {
console.info("auth onAcquireInfo module = " + module);
......
......@@ -93,12 +93,13 @@ userIAM_userAuth模块提供了用户认证的相关方法,包括检测认证
5. 认证过程中取消认证,代码示例如下:
```js
let auth = new userIAM_userAuth.UserAuth();
// contextId通过auth接口获取
let contextId = auth.auth(null, userIAM_userAuth.UserAuthType.FACE, userIAM_userAuth.AuthTrustLevel.ATL1, {
onResult: (result, extraInfo) => {
console.info("auth onResult result = " + result);
},
onAcquireInfo: (module, acquire, extraInfo) => {
console.info("auth onAcquireInfo module = " + module);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册