From 51250b47ddf6a116a46a2717eec7f4bf327c6196 Mon Sep 17 00:00:00 2001 From: youliang_1314 Date: Thu, 5 Jan 2023 10:02:06 +0000 Subject: [PATCH 1/2] update iam d.ts Signed-off-by: youliang_1314 Change-Id: I6cd7a87050c4232138f0fde75ff323449c8ce926 --- api/@ohos.userIAM.userAuth.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/@ohos.userIAM.userAuth.d.ts b/api/@ohos.userIAM.userAuth.d.ts index 5afe0fb0f1..318f422664 100644 --- a/api/@ohos.userIAM.userAuth.d.ts +++ b/api/@ohos.userIAM.userAuth.d.ts @@ -319,7 +319,7 @@ declare namespace userAuth { SUCCESS = 0, /** - * Indicates the the result is failure or ability is not supported. + * Indicates that authentication failed. * @syscap SystemCapability.UserIAM.UserAuth.Core * @since 8 * @deprecated since 9 @@ -712,7 +712,7 @@ declare namespace userAuth { * @permission ohos.permission.ACCESS_BIOMETRIC * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 401 - Incorrect parameters. - * @throws { BusinessError } 12500001 - Execution failed. + * @throws { BusinessError } 12500001 - Authentication failed. * @throws { BusinessError } 12500002 - General operation error. * @throws { BusinessError } 12500003 - The operation is canceled. * @throws { BusinessError } 12500004 - The operation is time-out. @@ -795,7 +795,7 @@ declare namespace userAuth { SUCCESS = 12500000, /** - * Indicates the result is failure or ability is not supported. + * Indicates that authentication failed. * @syscap SystemCapability.UserIAM.UserAuth.Core * @since 9 */ -- Gitee From b6468a83779a93f81f56df3bfe653c5cb3f670b3 Mon Sep 17 00:00:00 2001 From: gao-haiyuan Date: Wed, 11 Jan 2023 06:54:47 +0000 Subject: [PATCH 2/2] change annotation to suit error code Signed-off-by: gao-haiyuan Change-Id: I4e74597e34f21e784487c56b5f259b9f1ee58b0f --- api/@ohos.userIAM.userAuth.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/@ohos.userIAM.userAuth.d.ts b/api/@ohos.userIAM.userAuth.d.ts index 318f422664..df25551280 100644 --- a/api/@ohos.userIAM.userAuth.d.ts +++ b/api/@ohos.userIAM.userAuth.d.ts @@ -198,7 +198,7 @@ declare namespace userAuth { * @permission ohos.permission.ACCESS_BIOMETRIC * @param authType Credential type for authentication. * @param authTrustLevel Trust level of authentication result. - * @returns Returns a check result, which is specified by getAvailableStatus. + * @returns Returns a check result, which is specified by getAvailableStatus, the value of number is related to the ResultCode enum, **201** is check permission failed. * @syscap SystemCapability.UserIAM.UserAuth.Core * @since 8 * @deprecated since 9 @@ -212,7 +212,7 @@ declare namespace userAuth { * @param challenge Pass in challenge value. * @param authType Type of authentication. * @param authTrustLevel Trust level of authentication result. - * @param callback Return result and acquireInfo through callback. + * @param callback Return result and acquireInfo through callback, the value of result code is related to the ResultCode enum, **201** is check permission failed. * @returns Returns ContextId for cancel. * @syscap SystemCapability.UserIAM.UserAuth.Core * @since 8 @@ -225,7 +225,7 @@ declare namespace userAuth { * Cancel authentication with ContextID. * @permission ohos.permission.ACCESS_BIOMETRIC * @param contextID Cancel authentication and pass in ContextID. - * @returns Returns a number value indicating whether Cancel authentication was successful. + * @returns Returns a number value indicating whether Cancel authentication was successful, the value of number is related to the ResultCode enum, **201** is check permission failed. * @syscap SystemCapability.UserIAM.UserAuth.Core * @since 8 * @deprecated since 9 @@ -248,7 +248,7 @@ declare namespace userAuth { * If the authentication is passed, the authentication token is returned in extraInfo, * If the authentication fails, the remaining authentication times are returned in extraInfo, * If the authentication executor is locked, the freezing time is returned in extraInfo. - * @param result Authentication result code. + * @param result Authentication result code, the value of result code is related to the ResultCode enum, **201** is check permission failed. * @param extraInfo Pass the specific information for different situation. * @syscap SystemCapability.UserIAM.UserAuth.Core * @since 8 @@ -307,7 +307,7 @@ declare namespace userAuth { * @syscap SystemCapability.UserIAM.UserAuth.Core * @since 8 * @deprecated since 9 - * @useinstead ohos.userIAM.userAuth.ResultCodeV9 + * @useinstead ohos.userIAM.userAuth.UserAuthResultCode */ enum ResultCode { /** @@ -786,7 +786,7 @@ declare namespace userAuth { * @syscap SystemCapability.UserIAM.UserAuth.Core * @since 9 */ - enum ResultCodeV9 { + enum UserAuthResultCode { /** * Indicates that the result is success or ability is supported. * @syscap SystemCapability.UserIAM.UserAuth.Core @@ -795,7 +795,7 @@ declare namespace userAuth { SUCCESS = 12500000, /** - * Indicates that authentication failed. + * Indicates that the authentication result is failed. * @syscap SystemCapability.UserIAM.UserAuth.Core * @since 9 */ -- Gitee