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

!15502 [翻译完成】#I6I1IN

Merge pull request !15502 from Annie_wang/PR15254
...@@ -1685,7 +1685,7 @@ Deletes the authorization token of the specified authentication type for an app ...@@ -1685,7 +1685,7 @@ Deletes the authorization token of the specified authentication type for an app
| name | string | Yes | Name of the target app account. | | name | string | Yes | Name of the target app account. |
| owner | string | Yes | Owner of the app account. The value is the bundle name of the app. | | owner | string | Yes | Owner of the app account. The value is the bundle name of the app. |
| authType | string | Yes | Authentication type. | | authType | string | Yes | Authentication type. |
| token | string | Yes | Token to delete.| | token | string | Yes | Authorization token to delete.|
**Return value** **Return value**
...@@ -4561,8 +4561,8 @@ Enumerates the constants. ...@@ -4561,8 +4561,8 @@ Enumerates the constants.
Enumerates the result codes. Enumerates the result codes.
> **NOTE** > **NOTE**<br>
> This enum is supported since API version 8 and deprecated since API version 9. From API version 9, error codes are used. For details about the error codes, see [App Account Error Codes](../errorcodes/errorcode-app-account.md). > This enum is supported since API version 8 and deprecated since API version 9. Error codes are used from API version 9. For details, see [Account Management Error Codes](../errorcodes/errorcode-account.md).
**System capability**: SystemCapability.Account.AppAccount **System capability**: SystemCapability.Account.AppAccount
...@@ -4910,9 +4910,9 @@ Checks the account labels. This API uses an asynchronous callback to return the ...@@ -4910,9 +4910,9 @@ Checks the account labels. This API uses an asynchronous callback to return the
| labels | Array&lt;string&gt; | Yes | Labels to check. | | labels | Array&lt;string&gt; | Yes | Labels to check. |
| callback | [AuthCallback](#authcallback9) | Yes | Authenticator callback invoked to return the check result.| | callback | [AuthCallback](#authcallback9) | Yes | Authenticator callback invoked to return the check result.|
### isAccountRemovable<sup>9+</sup> ### checkAccountRemovable<sup>9+</sup>
isAccountRemovable(name: string, callback: AuthCallback): void; checkAccountRemovable(name: string, callback: AuthCallback): void;
Checks whether an app account can be deleted. This API uses an asynchronous callback to return the result. Checks whether an app account can be deleted. This API uses an asynchronous callback to return the result.
...@@ -4970,7 +4970,7 @@ Obtains the remote object of an authenticator. This API cannot be overloaded. ...@@ -4970,7 +4970,7 @@ Obtains the remote object of an authenticator. This API cannot be overloaded.
callback.onResult(account_appAccount.ResultCode.SUCCESS, result); callback.onResult(account_appAccount.ResultCode.SUCCESS, result);
} }
isAccountRemovable(name, callback) { checkAccountRemovable(name, callback) {
var result = {[account_appAccount.Constants.KEY_BOOLEAN_RESULT]: true}; var result = {[account_appAccount.Constants.KEY_BOOLEAN_RESULT]: true};
callback.onResult(account_appAccount.ResultCode.SUCCESS, result); callback.onResult(account_appAccount.ResultCode.SUCCESS, result);
} }
......
...@@ -63,8 +63,7 @@ ...@@ -63,8 +63,7 @@
- [Time and Time Zone Service Error Codes](errorcode-time.md) - [Time and Time Zone Service Error Codes](errorcode-time.md)
- [Webview Error Codes](errorcode-webview.md) - [Webview Error Codes](errorcode-webview.md)
- Account Management - Account Management
- [Account Error Codes](errorcode-account.md) - [Account Management Error Codes](errorcode-account.md)
- [App Account Error Codes](errorcode-app-account.md)
- Device Management - Device Management
- [Power Consumption Statistics Error Codes](errorcode-batteryStatistics.md) - [Power Consumption Statistics Error Codes](errorcode-batteryStatistics.md)
- [Brightness Error Codes](errorcode-brightness.md) - [Brightness Error Codes](errorcode-brightness.md)
......
# Account Error Codes # Account Management Error Codes
The following includes the error codes for OS accounts, distributed accounts, and app accounts. The following includes the error codes for OS accounts, distributed accounts, and app accounts.
...@@ -13,13 +13,13 @@ System service works abnormally. ...@@ -13,13 +13,13 @@ System service works abnormally.
The possible causes are as follows: The possible causes are as follows:
1. The account management service cannot start properly. 1. The account management service cannot start properly.
2. The IPC object for account management cannot be obtained. 2. The IPC object for account management cannot be obtained.
3. The services on which the account management depends cannot start properly or the IPC object cannot be obtained. 3. The services on which the account management depends cannot start properly, or the IPC object on which the account management depends cannot be obtained.
4. The service is not initialized. 4. The service is not initialized.
5. The disk space is insufficient. 5. The disk space is insufficient.
6. The file read or write fails. 6. The file read or write fails.
7. Directories cannot be created successfully. 7. Directories cannot be created.
8. Files cannot be created or deleted successfully. 8. Files cannot be created or deleted.
9. The database cannot be read or written successfully. 9. The database cannot be read or written.
**Solution** **Solution**
...@@ -74,15 +74,15 @@ The account does not exist. ...@@ -74,15 +74,15 @@ The account does not exist.
The possible causes are as follows: The possible causes are as follows:
1. The account to query, activate, or delete is not created. 1. The account to query, activate, or delete is not created.
2. The account to query, activate, or delete has been deleted. 2. The account to query, activate, or delete has been deleted.
3. The constraint, user name, or profile phone is set for an account that has been deleted. 3. The constraint, user name, or profile photo is set for an account that has been deleted.
4. The account to update is not created. 4. The account to update is not created.
5. The access permission is set for an account that does not exist. 5. The access permission is to be set for an account that does not exist.
6. The password is set, deleted, or queried for an account that does not exist. 6. The password is to be set, deleted, or queried for an account that does not exist.
7. The token is set or deleted for an account that does not exist. 7. The token is to be set or deleted for an account that does not exist.
8. Additional information is set for an account that does not exist. 8. Additional information is to be set for an account that does not exist.
9. Credentials are set for an account that does not exist. 9. Credentials are to be set for an account that does not exist.
10. Custom data is set for an account that does not exist. 10. Custom data is to be set for an account that does not exist.
11. Distributed synchronization is enabled for an account that does not exist. 11. Distributed synchronization is to be enabled for an account that does not exist.
**Solution** **Solution**
...@@ -96,7 +96,6 @@ The account already exists. ...@@ -96,7 +96,6 @@ The account already exists.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The account to create already exists. The account to create already exists.
**Solution** **Solution**
...@@ -111,7 +110,6 @@ Multi-user is not supported. ...@@ -111,7 +110,6 @@ Multi-user is not supported.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The device does not support multiple users. The device does not support multiple users.
**Solution** **Solution**
...@@ -126,7 +124,6 @@ The account type is not supported. ...@@ -126,7 +124,6 @@ The account type is not supported.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The device does not support the account type. The device does not support the account type.
**Solution** **Solution**
...@@ -141,12 +138,11 @@ The number of accounts has reached the limit. ...@@ -141,12 +138,11 @@ The number of accounts has reached the limit.
**Possible Causes** **Possible Causes**
The possible causes are as follows: A maximum of 1,000 OS accounts or app accounts can be created.
A maximum of 1000 OS accounts or app accounts can be created.
**Solution** **Solution**
Delete the accounts that are no longer used. Delete the accounts that are no longer used, and try again.
## 12300008 The Account Is Restricted ## 12300008 The Account Is Restricted
...@@ -173,12 +169,11 @@ The account has been activated. ...@@ -173,12 +169,11 @@ The account has been activated.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The account to activate is already activated. The account to activate is already activated.
**Solution** **Solution**
No action is required. No further action is required.
## 12300010 Account Service Not Respond ## 12300010 Account Service Not Respond
...@@ -189,7 +184,7 @@ The account service does not respond. ...@@ -189,7 +184,7 @@ The account service does not respond.
**Possible Causes** **Possible Causes**
The possible causes are as follows: The possible causes are as follows:
1. Repeated requests, such as the requests for activating an account or for applying the same settings, are submitted in a short period of time. 1. Repeated requests, such as the requests for activating an account or applying the same settings, are submitted in a short period of time.
2. When the number of authentication sessions for app accounts reaches 256, new authentication requests cannot be processed. 2. When the number of authentication sessions for app accounts reaches 256, new authentication requests cannot be processed.
**Solution** **Solution**
...@@ -204,7 +199,6 @@ The event listener has been registered. ...@@ -204,7 +199,6 @@ The event listener has been registered.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The listener to register has been registered with the system already. The listener to register has been registered with the system already.
**Solution** **Solution**
...@@ -219,7 +213,6 @@ The event listener has not been registered. ...@@ -219,7 +213,6 @@ The event listener has not been registered.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The event listener to unregister has not been registered. The event listener to unregister has not been registered.
**Solution** **Solution**
...@@ -268,7 +261,6 @@ The crdential inputer already exists. ...@@ -268,7 +261,6 @@ The crdential inputer already exists.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The PIN inputer has been registered and cannot be registered again before deregistration. The PIN inputer has been registered and cannot be registered again before deregistration.
**Solution** **Solution**
...@@ -283,7 +275,6 @@ The credential inputer is not found. ...@@ -283,7 +275,6 @@ The credential inputer is not found.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
No credential inputer is registered when a credential is authenticated, added or modified. No credential inputer is registered when a credential is authenticated, added or modified.
**Solution** **Solution**
...@@ -298,7 +289,6 @@ The trust level is not supported. ...@@ -298,7 +289,6 @@ The trust level is not supported.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The trust level passed in is not supported. The trust level passed in is not supported.
**Solution** **Solution**
...@@ -313,7 +303,6 @@ The authentication type is not supported. ...@@ -313,7 +303,6 @@ The authentication type is not supported.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The authentication type passed in is not supported. The authentication type passed in is not supported.
**Solution** **Solution**
...@@ -328,7 +317,6 @@ The authentication type does not exist. ...@@ -328,7 +317,6 @@ The authentication type does not exist.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The specified authentication type does not exist when a token is queried or deleted. The specified authentication type does not exist when a token is queried or deleted.
**Solution** **Solution**
...@@ -343,8 +331,6 @@ The authentication session does not exist. ...@@ -343,8 +331,6 @@ The authentication session does not exist.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The session callback to query does not exist. The session callback to query does not exist.
**Solution** **Solution**
...@@ -359,7 +345,6 @@ The authentication is canceled. ...@@ -359,7 +345,6 @@ The authentication is canceled.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The user cancels the authentication. The user cancels the authentication.
**Solution** **Solution**
...@@ -374,7 +359,6 @@ The authentication is locked. ...@@ -374,7 +359,6 @@ The authentication is locked.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
The number of authentication type errors exceeds the limit. The number of authentication type errors exceeds the limit.
**Solution** **Solution**
...@@ -407,9 +391,8 @@ The authentication service does not respond. ...@@ -407,9 +391,8 @@ The authentication service does not respond.
**Possible Causes** **Possible Causes**
The possible causes are as follows: The possible causes are as follows:
The total number of OS accounts being authenticated exceeds 5.
- The total number of OS accounts being authenticated exceeds 5. The authentication service of the third-party app does not respond.
- The authentication service of the third-party app does not respond.
**Solution** **Solution**
...@@ -423,17 +406,16 @@ The account authentication service does not exist. ...@@ -423,17 +406,16 @@ The account authentication service does not exist.
**Possible Causes** **Possible Causes**
The possible causes are as follows:
For app accounts: For app accounts:
1. When an authentication is requested, the app does not support the authentication service. 1. When an authentication is requested, the app does not support the authentication service.
2. When an account is added implicitly, the app does not support the authentication service. 2. When an account is added implicitly, the app does not support the authentication service.
3. When the credential of a specified account is verified, the app does not support the authentication service. 3. When the credential of a specified account is verified, the app does not support the authentication service.
4. When the authenticator attributes are set for an app, the app does not support the authentication service. 4. When the authenticator attributes are set for an app, the app does not support the authentication service.
5. During the account tags are checked, the specified app does not support the authentication service. 5. When the account tags are checked, the specified app does not support the authentication service.
**Solution** **Solution**
Cancel the operation or authenticate the app that supports the authentication service. Cancel the operation or authenticate an app that supports the authentication service.
## 12300114 Authentication Service Abnormal ## 12300114 Authentication Service Abnormal
...@@ -451,3 +433,76 @@ The possible causes are as follows: ...@@ -451,3 +433,76 @@ The possible causes are as follows:
1. Try again or restart the system. 1. Try again or restart the system.
2. Use the app authenticator that complies with specifications. 2. Use the app authenticator that complies with specifications.
## 12400001 Application Not Exist
**Error Message**
The application does not exist.
**Possible Causes**
The possible causes are as follows:
1. The target app does not exist when the app permission is set.
2. The target app does not exist when the app permission is authorized.
**Solution**
Check that the target app has been installed and use the bundle of the app.
## 12400002 Custom Data Not Exist
**Error Message**
The custom data does not exist.
**Possible Causes**
The key does not exist when you query the custom data of the account.
**Solution**
Query the custom data with a key that is already defined.
## 12400003 Custom Data Records Reached the Limit
**Error Message**
The number of custom data reaches upper limit.
**Possible Causes**
The number of custom data records of the target account has reached 512.
**Solution**
Delete the custom data records that are no longer used.
## 12400004 Token Count Reached the Limit
**Error Message**
The number of token reaches upper limit.
**Possible Causes**
The number of tokens of the target account has reached 1024.
**Solution**
Delete the tokens that are not longer used, and try again.
## 12400005 Bundles in the OAuth List Reached the Limit
**Error Message**
The size of authorization list reaches upper limit.
**Possible Causes**
The number of bundles in the authorization list has reached 1024.
**Solution**
Revoke authorization from the apps that do not require the authorization and try again.
# App Account Error Codes
## 12400001 Application Not Exist
**Error Message**
The application does not exist.
**Possible Causes**
The possible causes are as follows:
1. The target application does not exist when the app permission is set.
2. The target application does not exist when the app permission is authorized.
**Solution**
Check that the target app has been installed and use the bundle of the app.
## 12400002 Custom Data Not Exist
**Error Message**
The custom data does not exist.
**Possible Causes**
The possible causes are as follows:
The key does not exist when you query the custom data of the account.
**Solution**
Query the custom data with a key that is already defined.
## 12400003 The Number of Custom Data Records Has Reached the Limit
**Error Message**
The number of custom data records has reached the limit.
**Possible Causes**
The possible causes are as follows:
The number of custom data records of the target account has reached 512.
**Solution**
Delete the custom data records that are no longer used.
## 12400004 The Number of Tokens Has Reached the Limit
**Error Message**
The number of tokens has reached the limit.
**Possible Causes**
The possible causes are as follows:
The number of tokens of the target account has reached 1024.
**Solution**
Delete the tokens that are not longer used, and try again.
## 12400005 The Number of Bundles in the OAuth List Has Reached the Limit
**Error Message**
The number of bundles in the OAuth list has reached the limit.
**Possible Causes**
The possible causes are as follows:
The number of bundles in the authorization list has reached 1024.
**Solution**
1. Revoke authorization from the apps that do not require the authorization, and try again.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册