未验证 提交 127ab449 编写于 作者: O openharmony_ci 提交者: Gitee

!16576 AccessToken和Account一致性修改

Merge pull request !16576 from chennian/master
......@@ -206,8 +206,8 @@ grantUserGrantedPermission(tokenID: number, permissionName: Permissions, permiss
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. The tokenID is 0, or the string size of permissionName is larger than 256, or the flags value is invalid. |
| 12100002 | TokenId does not exist. |
| 12100003 | Permission does not exist. |
| 12100002 | The specified tokenID does not exist. |
| 12100003 | The specified permission does not exist. |
| 12100006 | The application specified by the tokenID is not allowed to be granted with the specified permission. Either the application is a sandbox or the tokenID is from a remote device. |
| 12100007 | Service is abnormal. |
......@@ -317,8 +317,8 @@ revokeUserGrantedPermission(tokenID: number, permissionName: Permissions, permis
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. The tokenID is 0, or the string size of permissionName is larger than 256, or the flags value is invalid. |
| 12100002 | TokenId does not exist. |
| 12100003 | Permission does not exist. |
| 12100002 | The specified tokenID does not exist. |
| 12100003 | The specified permission does not exist. |
| 12100006 | The application specified by the tokenID is not allowed to be revoked with the specified permission. Either the application is a sandbox or the tokenID is from a remote device. |
| 12100007 | Service is abnormal. |
......@@ -503,7 +503,7 @@ off(type: 'permissionStateChange', tokenIDList: Array<number>, permissionL
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. The tokenID in list is all invalid, or the permissionName in list is all invalid. |
| 12100001 | The parameter is invalid. The tokenIDs or permissionNames in the list are all invalid. |
| 12100004 | The interface is not used together with "on". |
| 12100007 | Service is abnormal. |
| 12100008 | Out of memory. |
......@@ -692,6 +692,44 @@ promise.then(data => {
});
```
### checkAccessTokenSync<sup>10+</sup>
checkAccessTokenSync(tokenID: number, permissionName: Permissions): GrantStatus;
校验应用是否被授予权限,同步返回结果。
**系统能力:** SystemCapability.Security.AccessToken
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------------- | ---- | ------------------------------------------ |
| tokenID | number | 是 | 要校验应用的身份标识。可通过应用的[ApplicationInfo](js-apis-bundleManager-applicationInfo.md)获得。 |
| permissionName | Permissions | 是 | 需要校验的权限名称,合法的权限名取值可在[系统权限定义列表](../../security/permission-list.md)中查询。 |
**返回值:**
| 类型 | 说明 |
| :------------ | :---------------------------------- |
| [GrantStatus](#grantstatus) | 枚举实例,返回授权状态。 |
**错误码:**
以下错误码的详细介绍请参见[程序访问控制错误码](../errorcodes/errorcode-access-token.md)
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. The tokenID is 0, or the string size of permissionName is larger than 256. |
**示例:**
```js
let atManager = abilityAccessCtrl.createAtManager();
let tokenID = 0; // 系统应用可以通过bundleManager.getApplicationInfo获取,普通应用可以通过bundleManager.getBundleInfoForSelf获取
let data = atManager.checkAccessTokenSync(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS");
console.log(`data->${JSON.stringify(data)}`);
```
### GrantStatus
表示授权状态的枚举。
......
......@@ -148,7 +148,6 @@ createAccount(name: string, options?: CreateAccountOptions): Promise&lt;void&gt;
| 12300002 | Invalid name or options. |
| 12300004 | Account already exists. |
| 12300007 | The number of accounts reaches the upper limit. |
| 12400003 | The number of custom data reaches the upper limit. |
**示例:**
......@@ -248,7 +247,7 @@ createAccountImplicitly(owner: string, options: CreateAccountImplicitlyOptions,
| 错误码ID | 错误信息 |
| ------- | ------- |
| 12300001 | System service exception. |
| 12300002 | Invalid name or options. |
| 12300002 | Invalid owner or options. |
| 12300007 | The number of accounts reaches the upper limit. |
| 12300010 | Account service busy. |
| 12300113 | Authenticator service not found. |
......@@ -481,7 +480,6 @@ checkAppAccess(name: string, bundleName: string, callback: AsyncCallback&lt;bool
| 12300001 | System service exception. |
| 12300002 | Invalid name or bundleName. |
| 12300003 | Account not found. |
| 12400001 | Application not found. |
**示例:**
......@@ -527,7 +525,6 @@ checkAppAccess(name: string, bundleName: string): Promise&lt;boolean&gt;
| 12300001 | System service exception. |
| 12300002 | Invalid name or bundleName. |
| 12300003 | Account not found. |
| 12400001 | Application not found. |
**示例:**
......@@ -903,7 +900,7 @@ setCustomData(name: string, key: string, value: string, callback: AsyncCallback&
| 错误码ID | 错误信息|
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid name or key or value. |
| 12300002 | Invalid name, key or value. |
| 12300003 | Account not found. |
| 12400003 | The number of custom data reaches the upper limit. |
......@@ -950,7 +947,7 @@ setCustomData(name: string, key: string, value: string): Promise&lt;void&gt;
| 错误码ID | 错误信息|
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid name or key or value. |
| 12300002 | Invalid name, key or value. |
| 12300003 | Account not found. |
| 12400003 | The number of custom data reaches the upper limit. |
......@@ -1267,7 +1264,6 @@ on(type: 'accountChange', owners: Array&lt;string&gt;, callback: Callback&lt;Arr
| ------- | ------- |
| 12300001 | System service exception. |
| 12300002 | Invalid type or owners. |
| 12300011 | Callback has been registered. |
| 12400001 | Application not found. |
**示例:**
......@@ -1304,7 +1300,6 @@ off(type: 'accountChange', callback?: Callback&lt;Array&lt;AppAccountInfo&gt;&gt
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid type. |
| 12300012 | Callback has not been registered. |
**示例:**
......@@ -1347,7 +1342,7 @@ auth(name: string, owner: string, authType: string, callback: AuthCallback): voi
| 错误码ID | 错误信息|
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid name or owner or authType. |
| 12300002 | Invalid name, owner or authType. |
| 12300003 | Account not found. |
| 12300010 | Account service busy. |
| 12300113 | Authenticator service not found. |
......@@ -1410,8 +1405,8 @@ auth(name: string, owner: string, authType: string, options: {[key: string]: Obj
| 错误码ID | 错误信息|
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid name or owner or authType. |
| 12300003 | Account not exist. |
| 12300002 | Invalid name, owner, authType or options. |
| 12300003 | Account not found. |
| 12300010 | Account service busy. |
| 12300113 | Authenticator service not found. |
| 12300114 | Authenticator service exception. |
......@@ -1522,7 +1517,7 @@ getAuthToken(name: string, owner: string, authType: string): Promise&lt;string&g
| 错误码ID | 错误信息 |
| ------- | ------- |
| 12300001 | System service exception. |
| 12300002 | Invalid name or owner or authType. |
| 12300002 | Invalid name, owner or authType. |
| 12300003 | Account not found. |
| 12300107 | AuthType not found. |
......@@ -1562,7 +1557,7 @@ setAuthToken(name: string, authType: string, token: string, callback: AsyncCallb
| 错误码ID | 错误信息|
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid name or authType or token. |
| 12300002 | Invalid name, authType or token. |
| 12300003 | Account not found. |
| 12400004 | The number of token reaches the upper limit. |
......@@ -1609,7 +1604,7 @@ setAuthToken(name: string, authType: string, token: string): Promise&lt;void&gt;
| 错误码ID | 错误信息|
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid name or authType or token. |
| 12300002 | Invalid name, authType or token. |
| 12300003 | Account not found. |
| 12400004 | The number of token reaches the upper limit. |
......@@ -1650,7 +1645,7 @@ deleteAuthToken(name: string, owner: string, authType: string, token: string, ca
| 错误码ID | 错误信息 |
| ------- | ------- |
| 12300001 | System service exception. |
| 12300002 | Invalid name or owner or authType or token. |
| 12300002 | Invalid name, owner, authType or token. |
| 12300003 | Account not found. |
| 12300107 | AuthType not found. |
......@@ -1698,7 +1693,7 @@ deleteAuthToken(name: string, owner: string, authType: string, token: string): P
| 错误码ID | 错误信息 |
| ------- | ------- |
| 12300001 | System service exception. |
| 12300002 | Invalid name or owner or authType or token. |
| 12300002 | Invalid name, owner, authType or token. |
| 12300003 | Account not found. |
| 12300107 | AuthType not found. |
......@@ -1739,7 +1734,7 @@ setAuthTokenVisibility(name: string, authType: string, bundleName: string, isVis
| 错误码ID | 错误信息|
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid name or authType or bundleName. |
| 12300002 | Invalid name, authType or bundleName. |
| 12300003 | Account not found. |
| 12300107 | AuthType not found. |
| 12400001 | Application not found. |
......@@ -1789,7 +1784,7 @@ setAuthTokenVisibility(name: string, authType: string, bundleName: string, isVis
| 错误码ID | 错误信息|
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid name or authType or bundleName. |
| 12300002 | Invalid name, authType or bundleName. |
| 12300003 | Account not found. |
| 12300107 | AuthType not found. |
| 12400001 | Application not found. |
......@@ -1831,10 +1826,9 @@ checkAuthTokenVisibility(name: string, authType: string, bundleName: string, cal
| 错误码ID | 错误信息|
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid name or authType or bundleName. |
| 12300002 | Invalid name, authType or bundleName. |
| 12300003 | Account not found. |
| 12300107 | AuthType not found. |
| 12400001 | Application not found. |
**示例:**
......@@ -1879,10 +1873,9 @@ checkAuthTokenVisibility(name: string, authType: string, bundleName: string): Pr
| 错误码ID | 错误信息|
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid name or authType or bundleName. |
| 12300002 | Invalid name, authType or bundleName. |
| 12300003 | Account not found. |
| 12300107 | AuthType not found. |
| 12400001 | Application not found. |
**示例:**
......@@ -2281,7 +2274,7 @@ checkAccountLabels(name: string, owner: string, labels: Array&lt;string&gt;, cal
| 错误码ID | 错误信息 |
| ------- | ------- |
| 12300001 | System service exception. |
| 12300002 | Invalid name or owner or labels. |
| 12300002 | Invalid name, owner or labels. |
| 12300003 | Account not found. |
| 12300010 | Account service busy. |
| 12300113 | Authenticator service not found. |
......@@ -2331,7 +2324,7 @@ checkAccountLabels(name: string, owner: string, labels: Array&lt;string&gt;): Pr
| 错误码ID | 错误信息 |
| ------- | ------- |
| 12300001 | System service exception. |
| 12300002 | Invalid name or owner or labels. |
| 12300002 | Invalid name, owner or labels. |
| 12300003 | Account not found. |
| 12300010 | Account service busy. |
| 12300113 | Authenticator service not found. |
......@@ -2594,7 +2587,7 @@ verifyCredential(name: string, owner: string, options: VerifyCredentialOptions,
| 错误码ID | 错误信息|
| ------- | -------|
| 12300001 | System service exception. |
| 12300002 | Invalid name or owner or options. |
| 12300002 | Invalid name, owner or options. |
| 12300003 | Account not found. |
| 12300010 | Account service busy. |
| 12300113 | Authenticator service not found. |
......
......@@ -232,7 +232,8 @@ setOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt;
| 错误码ID | 错误信息|
| -------- | ------------------- |
| 12300001 | System service exception. |
| 12300002 | invalid accountInfo. |
| 12300002 | Invalid accountInfo. |
| 12300003 | Account not found. |
**示例:**
```js
......@@ -325,4 +326,4 @@ updateOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise&lt;void&gt
| event | string | 是 | 分布式帐号登录状态,包括登录、登出、Token失效和注销,分别对应以下字符串:<br/>-&nbsp;Ohos.account.event.LOGIN<br/>-&nbsp;Ohos.account.event.LOGOUT<br/>-&nbsp;Ohos.account.event.TOKEN_INVALID<br/>-&nbsp;Ohos.account.event.LOGOFF |
| nickname<sup>9+</sup> | string | 否 | 分布式帐号的昵称,非空字符串。 |
| avatar<sup>9+</sup> | string | 否 | 分布式帐号的头像,非空字符串。 |
| scalableData | object | 否 | 分布式帐号扩展信息,根据业务所需,以k-v形式传递定制化信息。<br/>说明:该参数是预留的可选项,目前查询和更新的方法实现中未使用。 |
| scalableData<sup>8+</sup> | object | 否 | 分布式帐号扩展信息,根据业务所需,以k-v形式传递定制化信息。<br/>说明:该参数是预留的可选项,目前查询和更新的方法实现中未使用。 |
......@@ -326,9 +326,9 @@ checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: A
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid localId or constraint. |
| 12300003 | the account indicated by localId dose not exist. |
| 12300001 | System service exception. |
| 12300002 | Invalid localId or constraint. |
| 12300003 | Account not found. |
**示例:** 判断ID为100的系统帐号是否有禁止使用Wi-Fi的约束
......@@ -376,9 +376,9 @@ checkOsAccountConstraintEnabled(localId: number, constraint: string): Promise&lt
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid localId or constraint. |
| 12300003 | the account indicated by localId dose not exist. |
| 12300001 | System service exception. |
| 12300002 | Invalid localId or constraint. |
| 12300003 | Account not found. |
**示例:** 判断ID为100的系统帐号是否有禁止使用Wi-Fi的约束
......@@ -487,7 +487,7 @@ checkOsAccountVerified(callback: AsyncCallback&lt;boolean&gt;): void
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | system service exception. |
| 12300001 | System service exception. |
**示例:**
......@@ -527,9 +527,9 @@ checkOsAccountVerified(localId: number, callback: AsyncCallback&lt;boolean&gt;):
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid localId. |
| 12300003 | the account indicated by localId dose not exist. |
| 12300001 | System service exception. |
| 12300002 | Invalid localId. |
| 12300003 | Account not found. |
**示例:**
......@@ -575,9 +575,9 @@ checkOsAccountVerified(localId: number): Promise&lt;boolean&gt;
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid localId. |
| 12300003 | the account indicated by localId dose not exist. |
| 12300001 | System service exception. |
| 12300002 | Invalid localId. |
| 12300003 | Account not found. |
**示例:**
......@@ -720,7 +720,7 @@ setOsAccountConstraints(localId: number, constraints: Array&lt;string&gt;, enabl
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | System service exception. |
| 12300002 | Invalid localId. |
| 12300002 | Invalid localId or constraints. |
| 12300003 | Account not found. |
| 12300008 | Restricted Account. |
......@@ -774,7 +774,7 @@ setOsAccountConstraints(localId: number, constraints: Array&lt;string&gt;, enabl
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | System service exception. |
| 12300002 | Invalid localId. |
| 12300002 | Invalid localId or constraints. |
| 12300003 | Account not found. |
| 12300008 | Restricted Account. |
......@@ -987,7 +987,7 @@ getOsAccountLocalId(callback: AsyncCallback&lt;number&gt;): void
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | system service exception. |
| 12300001 | System service exception. |
**示例:**
......@@ -1024,7 +1024,7 @@ getOsAccountLocalId(): Promise&lt;number&gt;
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | system service exception. |
| 12300001 | System service exception. |
**示例:**
......@@ -1060,8 +1060,8 @@ getOsAccountLocalIdForUid(uid: number, callback: AsyncCallback&lt;number&gt;): v
| 错误码ID | 错误信息 |
| -------- | --------------- |
| 12300001 | system service exception. |
| 12300002 | invalid uid. |
| 12300001 | System service exception. |
| 12300002 | Invalid uid. |
**示例:** 查询值为12345678的uid所属的系统帐号的帐号ID
......@@ -1104,8 +1104,8 @@ getOsAccountLocalIdForUid(uid: number): Promise&lt;number&gt;
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 | system service exception. |
| 12300002 | invalid uid. |
| 12300001 | System service exception. |
| 12300002 | Invalid uid. |
**示例:** 查询值为12345678的uid所属的系统帐号ID
......@@ -1144,8 +1144,8 @@ getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo, callback: AsyncCallb
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 | system service exception. |
| 12300002 | invalid domainInfo. |
| 12300001 | System service exception. |
| 12300002 | Invalid domainInfo. |
**示例:**
......@@ -1191,8 +1191,8 @@ getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo): Promise&lt;number&g
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 | system service exception. |
| 12300002 | invalid domainInfo. |
| 12300001 | System service exception. |
| 12300002 | Invalid domainInfo. |
**示例:**
......@@ -1470,7 +1470,7 @@ getActivatedOsAccountLocalIds(callback: AsyncCallback&lt;Array&lt;number&gt;&gt;
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 | system service exception. |
| 12300001 | System service exception. |
**示例:**
......@@ -1507,7 +1507,7 @@ getActivatedOsAccountLocalIds(): Promise&lt;Array&lt;number&gt;&gt;
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 | system service exception. |
| 12300001 | System service exception. |
**示例:**
......@@ -1858,7 +1858,7 @@ queryOsAccountById(localId: number): Promise&lt;OsAccountInfo&gt;
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | System service exception. |
| 12300002 | Invalid localId. |
| 12300002 | Invalid localId. |
| 12300003 | Account not found. |
**示例:** 查询ID为100的系统帐号信息
......@@ -2229,9 +2229,9 @@ getOsAccountLocalIdForSerialNumber(serialNumber: number, callback: AsyncCallback
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid serialNumber. |
| 12300003 | the account indicated by serialNumber dose not exist. |
| 12300001 | System service exception. |
| 12300002 | Invalid serialNumber. |
| 12300003 | The account indicated by serialNumber dose not exist. |
**示例:** 查询与SN码12345关联的系统帐号的ID
......@@ -2272,9 +2272,9 @@ getOsAccountLocalIdForSerialNumber(serialNumber: number): Promise&lt;number&gt;
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid serialNumber. |
| 12300003 | the account indicated by serialNumber dose not exist. |
| 12300001 | System service exception. |
| 12300002 | Invalid serialNumber. |
| 12300003 | The account indicated by serialNumber dose not exist. |
**示例:** 查询与SN码12345关联的系统帐号的ID
......@@ -2311,9 +2311,9 @@ getSerialNumberForOsAccountLocalId(localId: number, callback: AsyncCallback&lt;n
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid localId. |
| 12300003 | the account indicated by localId dose not exist. |
| 12300001 | System service exception. |
| 12300002 | Invalid localId. |
| 12300003 | Account not found. |
**示例:** 获取ID为100的系统帐号关联的SN码
......@@ -2354,9 +2354,9 @@ getSerialNumberForOsAccountLocalId(localId: number): Promise&lt;number&gt;
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid localId. |
| 12300003 | the account indicated by localId dose not exist. |
| 12300001 | System service exception. |
| 12300002 | Invalid localId. |
| 12300003 | Account not found. |
**示例:** 获取ID为100的系统帐号关联的SN码
......@@ -2400,7 +2400,6 @@ on(type: 'activate' | 'activating', name: string, callback: Callback&lt;number&g
| -------- | ------------- |
| 12300001 | System service exception. |
| 12300002 | Invalid type or name. |
| 12300011 | Callback has been registered. |
**示例:**
......@@ -2442,7 +2441,6 @@ off(type: 'activate' | 'activating', name: string, callback?: Callback&lt;number
| -------- | ------------- |
| 12300001 | System service exception. |
| 12300002 | Invalid type or name. |
| 12300012 | Callback has not been registered. |
**示例:**
......@@ -2479,8 +2477,8 @@ getBundleIdForUid(uid: number, callback: AsyncCallback&lt;number&gt;): void;
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 | system service exception. |
| 12300002 | invalid uid. |
| 12300001 | System service exception. |
| 12300002 | Invalid uid. |
**示例:**
......@@ -2522,8 +2520,8 @@ getBundleIdForUid(uid: number): Promise&lt;number&gt;;
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 | system service exception. |
| 12300002 | invalid uid. |
| 12300001 | System service exception. |
| 12300002 | Invalid uid. |
**示例:**
......@@ -2640,9 +2638,9 @@ getOsAccountConstraintSourceTypes(localId: number, constraint: string, callback:
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 | system service exception. |
| 12300002 | invalid name or constraint. |
| 12300003 | the account indicated by localId dose not exist. |
| 12300001 | System service exception. |
| 12300002 | Invalid name or constraint. |
| 12300003 | Account not found. |
**示例:**
......@@ -2687,9 +2685,9 @@ getOsAccountConstraintSourceTypes(localId: number, constraint: string): Promise&
| 错误码ID | 错误信息 |
| -------- | ------------- |
| 12300001 | system service exception. |
| 12300002 | invalid name or constraint. |
| 12300003 | the account indicated by localId dose not exist. |
| 12300001 | System service exception. |
| 12300002 | Invalid name or constraint. |
| 12300003 | Account not found. |
**示例:**
......@@ -4113,9 +4111,9 @@ auth(challenge: Uint8Array, authType: AuthType, authTrustLevel: AuthTrustLevel,
| 12300101 | Credential is incorrect. |
| 12300105 | Unsupported authTrustLevel. |
| 12300106 | Unsupported authType. |
| 12300110 | Authentication locked. |
| 12300110 | Authentication is locked. |
| 12300111 | Authentication timeout. |
| 12300112 | Authentication service busy. |
| 12300112 | Authentication service is busy. |
**示例:**
```js
......@@ -4172,9 +4170,9 @@ authUser(userId: number, challenge: Uint8Array, authType: AuthType, authTrustLev
| 12300101 | Credential is incorrect. |
| 12300105 | Unsupported authTrustLevel. |
| 12300106 | Unsupported authType. |
| 12300110 | Authentication locked. |
| 12300110 | Authentication is locked. |
| 12300111 | Authentication timeout. |
| 12300112 | Authentication service busy. |
| 12300112 | Authentication service is busy. |
**示例:**
```js
......@@ -4282,7 +4280,7 @@ registerInputer(inputer: IInputer): void;
| 错误码ID | 错误信息 |
| -------- | --------------------------- |
| 12300001 | System service exception. |
| 12300102 | Invalid inputer. |
| 12300002 | Invalid inputer. |
| 12300103 | Inputer already registered. |
**示例:**
......@@ -4347,7 +4345,7 @@ static registerInputer(authType: AuthType, inputer: IInputer): void
| 错误码ID | 错误信息 |
| -------- | --------------------------- |
| 12300001 | System service exception. |
| 12300102 | Invalid authType or inputer. |
| 12300002 | Invalid authType or inputer. |
| 12300103 | The credential inputer has been registered. |
| 12300106 | Unsupported authType. |
......@@ -4716,7 +4714,7 @@ static registerPlugin(plugin: DomainPlugin): void
| 错误码ID | 错误信息 |
| -------- | --------------------------- |
| 12300201 | the domain plugin has been registered. |
| 12300201 | The domain plugin has been registered. |
**示例:**
```js
......@@ -4783,17 +4781,17 @@ auth(domainAccountInfo: DomainAccountInfo, credential: Uint8Array, callback: IUs
| 错误码ID | 错误信息 |
| -------- | --------------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid domainAccountInfo or credential. |
| 12300003 | domain account does not exist. |
| 12300013 | network exception. |
| 12300101 | authentication failed. |
| 12300109 | authentication is canceled. |
| 12300110 | authentication is locked. |
| 12300111 | authentication timeout. |
| 12300112 | authentication service is busy. |
| 12300113 | authentication service does not exist. |
| 12300114 | authentication service exception. |
| 12300001 | System service exception. |
| 12300002 | Invalid domainAccountInfo or credential. |
| 12300003 | Domain account does not exist. |
| 12300013 | Network exception. |
| 12300101 | Authentication failed. |
| 12300109 | Authentication is canceled. |
| 12300110 | Authentication is locked. |
| 12300111 | Authentication timeout. |
| 12300112 | Authentication service is busy. |
| 12300113 | Authentication service does not exist. |
| 12300114 | Authentication service exception. |
**示例:**
```js
......@@ -4836,16 +4834,16 @@ authWithPopup(callback: IUserAuthCallback): void
| 错误码ID | 错误信息 |
| -------- | --------------------------- |
| 12300001 | system service exception. |
| 12300003 | no domain account is bound. |
| 12300013 | network exception. |
| 12300101 | authentication failed. |
| 12300109 | authentication is canceled. |
| 12300110 | authentication is locked. |
| 12300111 | authentication timeout. |
| 12300112 | authentication service is busy. |
| 12300113 | authentication service does not exist. |
| 12300114 | authentication service exception. |
| 12300001 | System service exception. |
| 12300003 | No domain account is bound. |
| 12300013 | Network exception. |
| 12300101 | Authentication failed. |
| 12300109 | Authentication is canceled. |
| 12300110 | Authentication is locked. |
| 12300111 | Authentication timeout. |
| 12300112 | Authentication service is busy. |
| 12300113 | Authentication service does not exist. |
| 12300114 | Authentication service exception. |
**示例:**
```js
......@@ -4884,17 +4882,17 @@ authWithPopup(localId: number, callback: IUserAuthCallback): void
| 错误码ID | 错误信息 |
| -------- | --------------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid localId. |
| 12300003 | no domain account is bound. |
| 12300013 | network exception. |
| 12300101 | authentication failed. |
| 12300109 | authentication is canceled. |
| 12300110 | authentication is locked. |
| 12300111 | authentication timeout. |
| 12300112 | authentication service is busy. |
| 12300113 | authentication service does not exist. |
| 12300114 | authentication service exception. |
| 12300001 | System service exception. |
| 12300002 | Invalid localId. |
| 12300003 | No domain account is bound. |
| 12300013 | Network exception. |
| 12300101 | Authentication failed. |
| 12300109 | Authentication is canceled. |
| 12300110 | Authentication is locked. |
| 12300111 | Authentication timeout. |
| 12300112 | Authentication service is busy. |
| 12300113 | Authentication service does not exist. |
| 12300114 | Authentication service exception. |
**示例:**
```js
......@@ -4933,9 +4931,9 @@ hasAccount(domainAccountInfo: DomainAccountInfo, callback: AsyncCallback&lt;bool
| 错误码ID | 错误信息 |
| -------- | --------------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid domainAccountInfo. |
| 12300013 | network exception. |
| 12300001 | System service exception. |
| 12300002 | Invalid domainAccountInfo. |
| 12300013 | Network exception. |
**示例:**
```js
......@@ -4984,9 +4982,9 @@ hasAccount(domainAccountInfo: DomainAccountInfo): Promise&lt;boolean&gt;
| 错误码ID | 错误信息 |
| -------- | --------------------------- |
| 12300001 | system service exception. |
| 12300002 | invalid domainAccountInfo. |
| 12300013 | network exception. |
| 12300001 | System service exception. |
| 12300002 | Invalid domainAccountInfo. |
| 12300013 | Network exception. |
**示例:**
```js
......@@ -5389,7 +5387,6 @@ getAuthInfo(callback: AsyncCallback&lt;Array&lt;EnrolledCredInfo&gt;&gt;): void;
| 错误码ID | 错误信息 |
| -------- | --------------------- |
| 12300001 | System service exception. |
| 12300102 | Credential not found. |
**示例:**
```js
......@@ -5429,7 +5426,6 @@ getAuthInfo(authType: AuthType, callback: AsyncCallback&lt;Array&lt;EnrolledCred
| -------- | ------------------- |
| 12300001 | System service exception. |
| 12300002 | Invalid authType. |
| 12300102 | Credential not found. |
**示例:**
```js
......@@ -5474,7 +5470,6 @@ getAuthInfo(authType?: AuthType): Promise&lt;Array&lt;EnrolledCredInfo&gt;&gt;;
| -------- | ------------------- |
| 12300001 | System service exception. |
| 12300002 | Invalid authType. |
| 12300102 | Credential not found. |
**示例:**
```js
......@@ -5513,6 +5508,12 @@ onSetData: (authSubType: AuthSubType, data: Uint8Array) => void;
| authSubType | [AuthSubType](#authsubtype8) | 是 | 用于认证的凭据子类型。 |
| data | Uint8Array | 是 | 要设置的数据是凭据,用来在认证、添加、修改凭据操作。 |
**错误码:**
| 错误码ID | 错误信息 |
| -------- | ------------------- |
| 12300002 | Invalid pinSubType. |
**示例:**
```js
let password = new Uint8Array([0, 0, 0, 0, 0, 0]);
......@@ -5975,7 +5976,7 @@ onAcquireInfo?: (module: number, acquire: number, extraInfo: any) => void;
| ----------- | ------ | ---- | ---------- |
| domain | string | 是 | 域名。 |
| accountName | string | 是 | 域帐号名。 |
| accountId<sup>10+</sup> | string | 否 | 域帐号标识。 |
| accountId<sup>10+</sup> | string | 否 | 域帐号标识。<br>**系统接口:** 此接口为系统接口。 |
## 系统帐号约束列表
......
......@@ -46,8 +46,8 @@ addPermissionUsedRecord(tokenID: number, permissionName: Permissions, successCou
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. The tokenID is 0, or the string size of permissionName is larger than 256, or the count value is invalid. |
| 12100002 | The specified tokenID does not exist or it does not refer to an application process. |
| 12100003 | The specified permission does not exist or it is not an user_grant permission. |
| 12100002 | The specified tokenID does not exist or refer to an application process. |
| 12100003 | The specified permission does not exist or is not an user_grant permission. |
| 12100007 | Service is abnormal. |
| 12100008 | Out of memory. |
......@@ -96,8 +96,8 @@ addPermissionUsedRecord(tokenID: number, permissionName: Permissions, successCou
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. The tokenID is 0, or the string size of permissionName is larger than 256, or the count value is invalid. |
| 12100002 | The specified tokenID does not exist or it does not refer to an application process. |
| 12100003 | The specified permission does not exist or it is not an user_grant permission. |
| 12100002 | The specified tokenID does not exist or refer to an application process. |
| 12100003 | The specified permission does not exist or is not an user_grant permission. |
| 12100007 | Service is abnormal. |
| 12100008 | Out of memory. |
......@@ -149,8 +149,8 @@ getPermissionUsedRecord(request: PermissionUsedRequest): Promise&lt;PermissionUs
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. the value of flag in request is invalid. |
| 12100002 | The specified tokenID does not exist or it does not refer to an application process. |
| 12100003 | The specified permission does not exist or it is not an user_grant permission. |
| 12100002 | The specified tokenID does not exist or refer to an application process. |
| 12100003 | The specified permission does not exist or is not an user_grant permission. |
| 12100007 | Service is abnormal. |
| 12100008 | Out of memory. |
......@@ -204,8 +204,8 @@ getPermissionUsedRecord(request: PermissionUsedRequest, callback: AsyncCallback&
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. the value of flag in request is invalid. |
| 12100002 | The specified tokenID does not exist or it does not refer to an application process. |
| 12100003 | The specified permission does not exist or it is not an user_grant permission. |
| 12100002 | The specified tokenID does not exist or refer to an application process. |
| 12100003 | The specified permission does not exist or is not an user_grant permission. |
| 12100007 | Service is abnormal. |
| 12100008 | Out of memory. |
......@@ -267,8 +267,8 @@ startUsingPermission(tokenID: number, permissionName: Permissions): Promise&lt;v
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. The tokenID is 0, or the string size of permissionName is larger than 256. |
| 12100002 | The specified tokenID does not exist or it does not refer to an application process. |
| 12100003 | The specified permission does not exist or it is not an user_grant permission. |
| 12100002 | The specified tokenID does not exist or refer to an application process. |
| 12100003 | The specified permission does not exist or is not an user_grant permission. |
| 12100004 | The interface is called repeatedly with the same input. It means the application specified by the tokenID has been using the specified permission. |
| 12100007 | Service is abnormal. |
| 12100008 | Out of memory. |
......@@ -315,8 +315,8 @@ startUsingPermission(tokenID: number, permissionName: Permissions, callback: Asy
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. The tokenID is 0, or the string size of permissionName is larger than 256. |
| 12100002 | The specified tokenID does not exist or it does not refer to an application process. |
| 12100003 | The specified permission does not exist or it is not an user_grant permission. |
| 12100002 | The specified tokenID does not exist or refer to an application process. |
| 12100003 | The specified permission does not exist or is not an user_grant permission. |
| 12100004 | The interface is called repeatedly with the same input. It means the application specified by the tokenID has been using the specified permission. |
| 12100007 | Service is abnormal. |
| 12100008 | Out of memory. |
......@@ -370,8 +370,8 @@ stopUsingPermission(tokenID: number, permissionName: Permissions): Promise&lt;vo
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. The tokenID is 0, or the string size of permissionName is larger than 256. |
| 12100002 | The specified tokenID does not exist or it does not refer to an application process. |
| 12100003 | The specified permission does not exist or it is not an user_grant permission. |
| 12100002 | The specified tokenID does not exist or refer to an application process. |
| 12100003 | The specified permission does not exist or is not an user_grant permission. |
| 12100004 | The interface is not used with |
| 12100007 | Service is abnormal. |
| 12100008 | Out of memory. |
......@@ -418,8 +418,8 @@ stopUsingPermission(tokenID: number, permissionName: Permissions, callback: Asyn
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. The tokenID is 0, or the string size of permissionName is larger than 256. |
| 12100002 | The specified tokenID does not exist or it does not refer to an application process. |
| 12100003 | The specified permission does not exist or it is not an user_grant permission. |
| 12100002 | The specified tokenID does not exist or refer to an application process. |
| 12100003 | The specified permission does not exist or is not an user_grant permission. |
| 12100004 | The interface is not used with |
| 12100007 | Service is abnormal. |
| 12100008 | Out of memory. |
......@@ -512,7 +512,7 @@ off(type: 'activeStateChange', permissionList: Array&lt;Permissions&gt;, callbac
| 错误码ID | 错误信息 |
| -------- | -------- |
| 12100001 | The parameter is invalid. The permissionName in list is all invalid or the list size is larger than 1024. |
| 12100001 | The permissionNames in the list are all invalid, or the list size exceeds 1024 bytes. |
| 12100004 | The interface is not used together with "on"|
| 12100007 | Service is abnormal. |
| 12100008 | Out of memory. |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册