From 511c2ac867536e19ccec531371a2bee4d1fdab88 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Thu, 24 Nov 2022 19:01:08 +0800 Subject: [PATCH] update docs Signed-off-by: Annie_wang --- .../apis/js-apis-useriam-faceauth.md | 37 +- .../apis/js-apis-useriam-userauth.md | 536 +++++++++++++++++- 2 files changed, 525 insertions(+), 48 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-useriam-faceauth.md b/en/application-dev/reference/apis/js-apis-useriam-faceauth.md index 6069032794..9a45d1fe8f 100644 --- a/en/application-dev/reference/apis/js-apis-useriam-faceauth.md +++ b/en/application-dev/reference/apis/js-apis-useriam-faceauth.md @@ -37,45 +37,36 @@ A constructor used to create a **FaceAuthManager** object. ```js import userIAM_faceAuth from '@ohos.userIAM.faceAuth'; - let faceAuthManager = new userIAM_faceAuth.FaceAuthManager() + let faceAuthManager = new userIAM_faceAuth.FaceAuthManager(); ``` ### setSurfaceId -setSurfaceId(surfaceId: string): ResultCode; +setSurfaceId(surfaceId: string): void; Sets an [XComponent surface ID](../arkui-ts/ts-basic-components-xcomponent.md#getxcomponentsurfaceid) for the face preview page in the face enrollment process. **System capability**: SystemCapability.UserIAM.UserAuth.FaceAuth +**Required permissions**: ohos.permission.MANAGE_USER_IDM + **Parameters** | Name | Type | Mandatory| Description | | -------------- | ---------------------------------- | ---- | -------------------------- | | surfaceId | string | Yes | ID of the surface held by the [XComponent](../arkui-ts/ts-basic-components-xcomponent.md#getxcomponentsurfaceid).| -**Return value** - -| Type | Description | -| ---------- | ------------------------------------------------------------ | -| [ResultCode](#resultcode) | Operation result code.| - **Example** ```js - import userIAM_faceAuth from '@ohos.userIAM.faceAuth'; - - let faceAuthManager = new userIAM_faceAuth.FaceAuthManager() - faceAuthManager.setSurfaceId("0"); + import faceAuth from '@ohos.userIAM.faceAuth'; + + let surfaceId = "123456"; + let manager = new faceAuth.FaceAuthManager(); + try { + manager.setSurfaceId(surfaceId); + console.info("Set the surface ID successfully"); + } catch (e) { + console.error("Failed to set the surface ID, error = " + e); + } ``` - -## ResultCode - - Enumerates the operation result codes. - - **System capability**: SystemCapability.UserIAM.UserAuth.FaceAuth - -| Name | Default Value| Description | -| ----------------------- | ------ | -------------------- | -| SUCCESS | 0 | The operation is successful. | -| FAIL | 1 | The operation fails. | diff --git a/en/application-dev/reference/apis/js-apis-useriam-userauth.md b/en/application-dev/reference/apis/js-apis-useriam-userauth.md index a43b77bcf6..ce73ba0bcd 100644 --- a/en/application-dev/reference/apis/js-apis-useriam-userauth.md +++ b/en/application-dev/reference/apis/js-apis-useriam-userauth.md @@ -14,6 +14,85 @@ import userIAM_userAuth from '@ohos.userIAM.userAuth'; ## Sample Code +```js +// API version 9 +import userIAM_userAuth from '@ohos.userIAM.userAuth'; + +export default { + getVersion() { + try { + let version = userIAM_userAuth.getVersion(); + console.info("auth version = " + version); + } catch (error) { + console.info("get version failed, error = " + error); + } + }, + + start() { + console.info("start auth"); + let challenge = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); + let authType = userIAM_userAuth.UserAuthType.FACE; + let authTrustLevel = userIAM_userAuth.AuthTrustLevel.ATL1; + try { + let auth = userIAM_userAuth.getAuthInstance(challenge, authType, authTrustLevel); + auth.on("result", { + callback: (result: userIAM_userAuth.AuthResultInfo) => { + console.log("authV9 result " + result.result); + console.log("authV9 token " + result.token); + console.log("authV9 remainAttempts " + result.remainAttempts); + console.log("authV9 lockoutDuration " + result.lockoutDuration); + } + }); + // If tips are needed + auth.on("tip", { + callback : (result : userIAM_userAuth.TipInfo) => { + switch (result.tip) { + case userIAM_userAuth.FaceTips.FACE_AUTH_TIP_TOO_BRIGHT: + // Do something; + case userIAM_userAuth.FaceTips.FACE_AUTH_TIP_TOO_DARK: + // Do something; + // ... + default: + // Do others. + } + } + }); + auth.start(); + console.log("authV9 start success"); + } catch (error) { + console.log("authV9 error = " + error); + // do error + } + }, + + getAvailableStatus() { + console.info("start check auth support"); + try { + userIAM_userAuth.getAvailableStatus(userIAM_userAuth.UserAuthType.FACE, userIAM_userAuth.AuthTrustLevel.ATL1); + console.info("current auth trust level is supported"); + } catch (error) { + console.info("current auth trust level is not supported, error = " + error); + } + }, + + cancel() { + console.info("start cancel auth"); + let challenge = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); + let authType = userIAM_userAuth.UserAuthType.FACE; + let authTrustLevel = userIAM_userAuth.AuthTrustLevel.ATL1; + + try { + let auth = userIAM_userAuth.getAuthInstance(challenge, authType, authTrustLevel); + auth.start(); + auth.cancel(); + console.info("cancel auth success"); + } catch (error) { + console.info("cancel auth failed, error = " + error); + } + } +} +``` + ```js // API version 8 import userIAM_userAuth from '@ohos.userIAM.userAuth'; @@ -22,13 +101,13 @@ let auth = new userIAM_userAuth.UserAuth(); export default { getVersion() { console.info("start get version"); - let version = this.auth.getVersion(); + let version = auth.getVersion(); console.info("auth version = " + version); }, startAuth() { console.info("start auth"); - this.auth.auth(null, userIAM_userAuth.UserAuthType.FACE, userIAM_userAuth.AuthTrustLevel.ATL1, { + auth.auth(null, userIAM_userAuth.UserAuthType.FACE, userIAM_userAuth.AuthTrustLevel.ATL1, { onResult: (result, extraInfo) => { try { console.info("auth onResult result = " + result); @@ -108,15 +187,388 @@ export default { } ``` +## EventInfo9+ + +Defines the event information used in authentication. + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +| Type | Description | +| --------- | ----------------------- | +| [AuthResultInfo](#authresultinfo9) | Authentication result information. | +| [TipInfo](#tipinfo9) | Authentication tip information. | + +## AuthEvent9+ + +Provides callbacks to return authentication events. + +### callback9+ + +callback: (result : EventInfo) => void + +Called to return the authentication result or authentication tips. + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | -------------------------- | ---- | -------------------------------------------------------- | +| result | [EventInfo](#eventinfo9) | Yes | Authentication result or tip information. | + +**Example** + + ```js + import userIAM_userAuth from '@ohos.userIAM.userAuth'; + + let challenge = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); + let authType = userIAM_userAuth.UserAuthType.FACE; + let authTrustLevel = userIAM_userAuth.AuthTrustLevel.ATL1; + try { + let auth = userIAM_userAuth.getAuthInstance(challenge, authType, authTrustLevel); + auth.on("result", { + callback: (result: userIAM_userAuth.AuthResultInfo) => { + console.log("authV9 result " + result.result); + console.log("authV9 token " + result.token); + console.log("authV9 remainAttempts " + result.remainAttempts); + console.log("authV9 lockoutDuration " + result.lockoutDuration); + } + }); + auth.start(); + console.log("authV9 start success"); + } catch (error) { + console.log("authV9 error = " + error); + // do error + } + ``` + +## AuthResultInfo9+ + +Defines the authentication result information. + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +| Name | Type | Mandatory| Description | +| ------------ | ---------- | ---- | -------------------- | +| result | number | Yes | Authentication result. | +| token | Uint8Array | No | Token that has passed the user identity authentication.| +| remainAttempts | number | No | Number of remaining authentication times allowed.| +| lockoutDuration | number | No | Time for which the authentication operation is frozen.| + +## TipInfo9+ + +Defines the authentication tip information. + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +| Name | Type | Mandatory| Description | +| ------------ | ---------- | ---- | -------------------- | +| module | number | No | Authentication module. | +| tip | number | No | Tip to be given during the authentication process. | + +## AuthEventKey9+ + +Defines the keyword of an authentication event. + +| Value | Description | +| ---------- | ----------------------- | +| "result" | Indicates authentication result.| +| "tip" | If **AuthEventKey** is **result**, the callback returns the authentication tip information.| + +## AuthInstance9+ + +Implements user authentication. + +### on9+ + +on(name : AuthEventKey, callback : AuthEvent) : void + +Enables authentication event listening. + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| --------- | -------------------------- | ---- | ------------------------- | +| name | AuthEventKey | Yes | Keyword of the authentication event to listen for. | +| callback | AuthEvent | Yes | Callback invoked to return the authentication event. | + +**Example** + + ```js + import userIAM_userAuth from '@ohos.userIAM.userAuth'; + + let challenge = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); + let authType = userIAM_userAuth.UserAuthType.FACE; + let authTrustLevel = userIAM_userAuth.AuthTrustLevel.ATL1; + try { + let auth = userIAM_userAuth.getAuthInstance(challenge, authType, authTrustLevel); + auth.on("result", { + callback: (result: userIAM_userAuth.AuthResultInfo) => { + console.log("authV9 result " + result.result); + console.log("authV9 token " + result.token); + console.log("authV9 remainAttempts " + result.remainAttempts); + console.log("authV9 lockoutDuration " + result.lockoutDuration); + } + }); + // If tips are needed + auth.on("tip", { + callback : (result : userIAM_userAuth.TipInfo) => { + switch (result.tip) { + case userIAM_userAuth.FaceTips.FACE_AUTH_TIP_TOO_BRIGHT: + // Do something; + case userIAM_userAuth.FaceTips.FACE_AUTH_TIP_TOO_DARK: + // Do something; + // ... + default: + // Do others. + } + } + }); + auth.start(); + console.log("authV9 start success"); + } catch (error) { + console.log("authV9 error = " + error); + // do error + } + ``` + +### off9+ + +off(name : AuthEventKey) : void + +Disables authentication event listening. + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +| Name | Type | Mandatory| Description | +| --------- | -------------------------- | ---- | ------------------------- | +| name | AuthEventKey | Yes | Keyword of the authentication event. | + +**Example** + + ```js + import userIAM_userAuth from '@ohos.userIAM.userAuth'; + + let challenge = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); + let authType = userIAM_userAuth.UserAuthType.FACE; + let authTrustLevel = userIAM_userAuth.AuthTrustLevel.ATL1; + + try { + let auth = userIAM_userAuth.getAuthInstance(challenge, authType, authTrustLevel); + auth.on("result", { + callback: (result: userIAM_userAuth.AuthResultInfo) => { + console.log("authV9 result " + result.result); + console.log("authV9 token " + result.token); + console.log("authV9 remainAttempts " + result.remainAttempts); + console.log("authV9 lockoutDuration " + result.lockoutDuration); + } + }); + console.log("turn on authentication event listening success"); + } catch (error) { + console.log("turn off authentication event listening failed " + error); + // do error + } + + try { + let auth = userIAM_userAuth.getAuthInstance(challenge, authType, authTrustLevel); + auth.off("result"); + console.info("turn off authentication event listening success"); + } catch (error) { + console.info("turn off authentication event listening failed, error = " + error); + } + ``` + +### start9+ + +start() : void + +Starts authentication. + +**Required permissions**: ohos.permission.ACCESS_BIOMETRIC + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +**Example** + + ```js + import userIAM_userAuth from '@ohos.userIAM.userAuth'; + + let challenge = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); + let authType = userIAM_userAuth.UserAuthType.FACE; + let authTrustLevel = userIAM_userAuth.AuthTrustLevel.ATL1; + + try { + let auth = userIAM_userAuth.getAuthInstance(challenge, authType, authTrustLevel); + auth.start(); + console.info("authV9 start auth success"); + } catch (error) { + console.info("authV9 start auth failed, error = " + error); + } + ``` + +### cancel9+ + +cancel(): void + +Cancels the authentication. + +**Required permissions**: ohos.permission.ACCESS_BIOMETRIC + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +**Example** + + ```js + import userIAM_userAuth from '@ohos.userIAM.userAuth'; + + let challenge = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); + let authType = userIAM_userAuth.UserAuthType.FACE; + let authTrustLevel = userIAM_userAuth.AuthTrustLevel.ATL1; + + try { + let auth = userIAM_userAuth.getAuthInstance(challenge, authType, authTrustLevel); + auth.start(); + auth.cancel(); + console.info("cancel auth success"); + } catch (error) { + console.info("cancel auth failed, error = " + error); + } + ``` + +## userIAM_userAuth.getAuthInstance9+ + +getAuthInstance(challenge : Uint8Array, authType : UserAuthType, authTrustLevel : AuthTrustLevel): AuthInstance + +Obtains an **AuthInstance** instance for user authentication. + +> **NOTE**
+> Each **AuthInstance** can be used to initiate an authentication only once. + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------------- | ---------------------------------------- | ---- | ------------------------ | +| challenge | Uint8Array | Yes | Challenge value. The maximum length is 32 bytes. The value can be **null**. | +| authType | [UserAuthType](#userauthtype8) | Yes | Authentication type. Only **FACE** is supported.| +| authTrustLevel | [AuthTrustLevel](#authtrustlevel8) | Yes | Authentication trust level. | + +**Return value** + +| Type | Description | +| ----------------------------------------- | ------------ | +| [AuthInstance](#authinstance9) | **Authenticator** object obtained.| + +**Example** + ```js + import userIAM_userAuth from '@ohos.userIAM.userAuth'; + + let challenge = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); + let authType = userIAM_userAuth.UserAuthType.FACE; + let authTrustLevel = userIAM_userAuth.AuthTrustLevel.ATL1; + + try { + let auth = userIAM_userAuth.getAuthInstance(challenge, authType, authTrustLevel); + console.info("get auth instance success"); + } catch (error) { + console.info("get auth instance success failed, error = " + error); + } + ``` + +## userIAM_userAuth.getVersion9+ + +getVersion(): number + +Obtains the version of this authenticator. + +**Required permissions**: ohos.permission.ACCESS_BIOMETRIC + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +**Return value** + +| Type | Description | +| ------ | ---------------------- | +| number | Authenticator version obtained.| + +**Example** + + ```js + import userIAM_userAuth from '@ohos.userIAM.userAuth'; + + try { + let version = userIAM_userAuth.getVersion(); + console.info("auth version = " + version); + } catch (error) { + console.info("get version failed, error = " + error); + } + ``` + +## userIAM_userAuth.getAvailableStatus9+ + +getAvailableStatus(authType : UserAuthType, authTrustLevel : AuthTrustLevel): void + +Checks whether the authentication capability of the specified trust level is available. + +**Required permissions**: ohos.permission.ACCESS_BIOMETRIC + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +**Parameters** + +| Name | Type | Mandatory| Description | +| -------------- | ---------------------------------- | ---- | -------------------------- | +| authType | [UserAuthType](#userauthtype8) | Yes | Authentication type. Only **FACE** is supported.| +| authTrustLevel | [AuthTrustLevel](#authtrustlevel8) | Yes | Trust level of the authentication result. | + +**Example** + + ```js + import userIAM_userAuth from '@ohos.userIAM.userAuth'; + + try { + userIAM_userAuth.getAvailableStatus(userIAM_userAuth.UserAuthType.FACE, userIAM_userAuth.AuthTrustLevel.ATL1); + console.info("current auth trust level is supported"); + } catch (error) { + console.info("current auth trust level is not supported, error = " + error); + } + ``` + + ## ResultCodeV99+ + +Enumerates the operation results. + +**System capability**: SystemCapability.UserIAM.UserAuth.Core + +| Name | Default Value| Description | +| ----------------------- | ------ | -------------------- | +| SUCCESS | 12500000 | The operation is successful. | +| FAIL | 12500001 | The operation failed. | +| GENERAL_ERROR | 12500002 | A common operation error occurred. | +| CANCELED | 12500003 | The operation is canceled. | +| TIMEOUT | 12500004 | The operation timed out. | +| TYPE_NOT_SUPPORT | 12500005 | The authentication type is not supported. | +| TRUST_LEVEL_NOT_SUPPORT | 12500006 | The authentication trust level is not supported. | +| BUSY | 12500007 | Indicates the busy state. | +| INVALID_PARAMETERS | 12500008 | Invalid parameters are detected. | +| LOCKED | 12500009 | The authentication executor is locked. | +| NOT_ENROLLED | 12500010 | The user has not entered the authentication information.| ## UserAuth8+ Provides methods to manage an **Authenticator** object. -### constructor8+ +### constructor(deprecated) constructor() +> **NOTE** +> +>This API is supported since API version 8 and deprecated since API version 9. You are advised to use [getAuthInstance](#useriam_userauthgetauthinstance9). + A constructor used to create an **authenticator** object. **System capability**: SystemCapability.UserIAM.UserAuth.Core @@ -135,10 +587,14 @@ A constructor used to create an **authenticator** object. let auth = new userIAM_userAuth.UserAuth(); ``` -### getVersion8+ +### getVersion(deprecated) getVersion() : number +> **NOTE** +> +>This API is supported since API version 8 and deprecated since API version 9. You are advised to use [getVersion](#useriam_userauthgetversion9). + Obtains the authentication executor version. **Required permissions**: ohos.permission.ACCESS_BIOMETRIC @@ -161,11 +617,15 @@ Obtains the authentication executor version. console.info("auth version = " + version); ``` -### getAvailableStatus8+ +### getAvailableStatus(deprecated) getAvailableStatus(authType : UserAuthType, authTrustLevel : AuthTrustLevel) : number -Checks whether the authentication capability of the specified trust level is available. +> **NOTE** +> +>This API is supported since API version 8 and deprecated since API version 9. You are advised to use [getAvailableStatus](#useriam_userauthgetavailablestatus9). + +Obtains the available status of the specified authentication trust level. **Required permissions**: ohos.permission.ACCESS_BIOMETRIC @@ -182,7 +642,7 @@ Checks whether the authentication capability of the specified trust level is ava | Type | Description | | ------ | ------------------------------------------------------------ | -| number | Whether the authentication capability of the specified trust level is available. For details, see [ResultCode](#resultcode8).| +| number | Available status obtained. For details, see [ResultCode](#resultcodedeprecated).| **Example** @@ -200,10 +660,14 @@ Checks whether the authentication capability of the specified trust level is ava } ``` -### auth8+ +### auth(deprecated) auth(challenge: Uint8Array, authType: UserAuthType, authTrustLevel: AuthTrustLevel, callback: IUserAuthCallback): Uint8Array +> **NOTE** +> +>This API is supported since API version 8 and deprecated since API version 9. You are advised to use [start](#start9). + Performs user authentication. This API uses a callback to return the result. **Required permissions**: ohos.permission.ACCESS_BIOMETRIC @@ -217,13 +681,13 @@ Performs user authentication. This API uses a callback to return the result. | challenge | Uint8Array | Yes | Challenge value, which can be null. | | authType | [UserAuthType](#userauthtype8) | Yes | Authentication type. Only **FACE** is supported.| | authTrustLevel | [AuthTrustLevel](#authtrustlevel8) | Yes | Trust level. | -| callback | [IUserAuthCallback](#iuserauthcallback8) | Yes | Callback used to return the result. | +| callback | [IUserAuthCallback](#iuserauthcallbackdeprecated) | Yes | Callback used to return the result. | **Return value** | Type | Description | | ---------- | ------------------------------------------------------------ | -| Uint8Array | ContextId, which is used as the input parameter of [cancelAuth](#cancelauth8).| +| Uint8Array | Context ID, which is used as the input parameter of [cancelAuth](#cancelauthdeprecated).| **Example** @@ -248,10 +712,14 @@ Performs user authentication. This API uses a callback to return the result. }); ``` -### cancelAuth8+ +### cancelAuth(deprecated) cancelAuth(contextID : Uint8Array) : number +> **NOTE** +> +>This API is supported since API version 8 and deprecated since API version 9. You are advised to use [cancel](#cancel9). + Cancels an authentication. **Required permissions**: ohos.permission.ACCESS_BIOMETRIC @@ -262,7 +730,7 @@ Cancels an authentication. | Name | Type | Mandatory| Description | | --------- | ---------- | ---- | ------------------------------------------ | -| contextID | Uint8Array | Yes | Context ID, which is obtained using [auth](#auth8).| +| contextID | Uint8Array | Yes | Context ID, which is obtained by using [auth](#authdeprecated).| **Return value** @@ -286,14 +754,22 @@ Cancels an authentication. } ``` -## IUserAuthCallback8+ +## IUserAuthCallback(deprecated) + +> **NOTE** +> +>This object is supported since API version 8 and deprecated since API version 9. You are advised to use [AuthEvent](#authevent9). Defines the object of the result returned by the callback during authentication. -### onResult8+ +### onResult(deprecated) onResult: (result : number, extraInfo : AuthResult) => void +> **NOTE** +> +>This API is supported since API version 8 and deprecated since API version 9. You are advised to use [callback](#callback9). + Obtains the authentication result. **System capability**: SystemCapability.UserIAM.UserAuth.Core @@ -302,8 +778,8 @@ Obtains the authentication result. | Name | Type | Mandatory| Description | | --------- | -------------------------- | ---- | ------------------------------------------------------------ | -| result | number | Yes | Authentication result obtained. For details, see [ResultCode](#resultcode8). | -| extraInfo | [AuthResult](#authresult8) | Yes | Extended information, which varies depending on the authentication result.
If the authentication is successful, the user authentication token will be returned in **extraInfo**.
If the authentication fails, the remaining number of authentication times will be returned in **extraInfo**.
If the authentication executor is locked, the freeze time will be returned in **extraInfo**.| +| result | number | Yes | Authentication result. For details, see [ResultCode](#resultcodedeprecated). | +| extraInfo | [AuthResult](#authresultdeprecated) | Yes | Extended information, which varies depending on the authentication result.
If the authentication is successful, the user authentication token will be returned in **extraInfo**.
If the authentication fails, the remaining number of authentication times will be returned in **extraInfo**.
If the authentication executor is locked, the freeze time will be returned in **extraInfo**.| **Example** @@ -339,10 +815,14 @@ Obtains the authentication result. }); ``` -### onAcquireInfo8+ +### onAcquireInfo(deprecated) onAcquireInfo ?: (module : number, acquire : number, extraInfo : any) => void +> **NOTE** +> +>This API is supported since API version 8 and deprecated since API version 9. You are advised to use [callback](#callback9). + Obtains the tip code information during authentication. This function is optional. **System capability**: SystemCapability.UserIAM.UserAuth.Core @@ -388,7 +868,11 @@ Obtains the tip code information during authentication. This function is optiona }); ``` -## AuthResult8+ +## AuthResult(deprecated) + +> **NOTE** +> +>This object is supported since API version 8 and deprecated since API version 9. You are advised to use [AuthResultInfo](#authresultinfo9). Represents the authentication result object. @@ -400,7 +884,10 @@ Represents the authentication result object. | remainTimes | number | No | Number of remaining authentication operations.| | freezingTime | number | No | Time for which the authentication operation is frozen.| -## ResultCode8+ +## ResultCode(deprecated) + +> **NOTE**
+> This object is deprecated since API version 9. You are advised to use [ResultCodeV9](#resultcodev99). Enumerates the operation results. @@ -416,7 +903,6 @@ Enumerates the operation results. | TYPE_NOT_SUPPORT | 5 | The authentication type is not supported. | | TRUST_LEVEL_NOT_SUPPORT | 6 | The authentication trust level is not supported. | | BUSY | 7 | Indicates the busy state. | -| INVALID_PARAMETERS | 8 | Invalid parameters are detected. | | LOCKED | 9 | The authentication executor is locked. | | NOT_ENROLLED | 10 | The user has not entered the authentication information.| @@ -487,7 +973,7 @@ Enumerates the trust levels of the authentication result. getAuthenticator(): Authenticator > **NOTE**
-> This API is not longer maintained since API version 8. You are advised to use [constructor](#constructor8). +> This API is deprecated since API version 8. You are advised to use [constructor](#constructordeprecated). Obtains an **Authenticator** object for user authentication. @@ -507,7 +993,7 @@ Obtains an **Authenticator** object for user authentication. ## Authenticator(deprecated) > **NOTE**
-> This object is not longer maintained since API version 8. You are advised to use [UserAuth](#userauth8). +> This object is deprecated since API version 8. You are advised to use [UserAuth](#userauth8). Provides methods to manage an **Authenticator** object. @@ -517,7 +1003,7 @@ Provides methods to manage an **Authenticator** object. execute(type: AuthType, level: SecureLevel, callback: AsyncCallback<number>): void > **NOTE**
-> This API is not longer maintained since API version 8. You are advised to use [auth](#auth8). +> This API is deprecated since API version 8. You are advised to use [auth](#authdeprecated). Performs user authentication. This API uses asynchronous callback to return the result. @@ -557,7 +1043,7 @@ Performs user authentication. This API uses asynchronous callback to return the execute(type:AuthType, level:SecureLevel): Promise<number> > **NOTE**
-> This API is not longer maintained since API version 8. You are advised to use [auth](#auth8). +> This API is deprecated since API version 8. You are advised to use [auth](#authdeprecated). Performs user authentication. This API uses a promise to return the result. @@ -592,7 +1078,7 @@ Performs user authentication. This API uses a promise to return the result. ## AuthenticationResult(deprecated) > **NOTE**
-> This parameter is not longer maintained since API version 8. You are advised to use [ResultCode](#resultcode8). +> This object is discarded since API version 8. You are advised to use [ResultCode](#resultcodedeprecated). Enumerates the authentication results. -- GitLab