提交 b6b1869c 编写于 作者: J jidong

fix problem in demo code

Signed-off-by: Njidong <jidong4@huawei.com>
上级 e52505dc
......@@ -1523,6 +1523,8 @@ getAuthenticatorCallback(sessionId: string): Promise&lt;AuthenticatorCallback&gt
**示例:**
```js
import featureAbility from '@ohos.ability.featureAbility';
const appAccountManager = account_appAccount.createAppAccountManager();
featureAbility.getWant().then((want) => {
var sessionId = want.parameters[account_appAccount.Constants.KEY_SESSION_ID];
......
......@@ -2326,7 +2326,7 @@ registerInputer(inputer: IInputer): boolean;
**示例:**
```js
let pinAuth = new account_osAccount.PINAuth();
let password = new Uint8Array([0, 0, 0, 0, 0];
let password = new Uint8Array([0, 0, 0, 0, 0]);
let result = pinAuth.registerInputer({
onGetData: (pinSubType, callback) => {
callback.onSetData(pinSubType, password);
......@@ -2509,7 +2509,7 @@ updateCredential(credentialInfo: CredentialInfo, callback: IIdmCallback): void;
}
});
userIDM.openSession((err, challenge) => {
userAuth.auth(challenge, credentialInfo.credType, account_osAccount.AuthTrustLevel.ATL_1, {
userAuth.auth(challenge, credentialInfo.credType, account_osAccount.AuthTrustLevel.ATL1, {
onResult: (result, extraInfo) => {
if (result != account_osAccount.ResultCode.SUCCESS) {
return;
......@@ -2571,8 +2571,9 @@ cancel(challenge: Uint8Array): number;
**示例:**
```js
let userIDM = new account_osAccount.UserIdentityManager();
let challenge = 1;
let cancelresult = userIDM.cancel(challenge);
let challenge = new Uint8Array([0]);
let result = userIDM.cancel(challenge);
console.log("cancel result: " + result);
```
### delUser<sup>8+</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册