diff --git a/api/@ohos.userIAM.userAuth.d.ts b/api/@ohos.userIAM.userAuth.d.ts index 00a19360bb86f991a5cefc9527556f224591148c..c781c04bc68086f842456940914df0ede575e9d6 100644 --- a/api/@ohos.userIAM.userAuth.d.ts +++ b/api/@ohos.userIAM.userAuth.d.ts @@ -126,12 +126,13 @@ declare namespace userAuth { /** * User authentication. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ class UserAuth { /** * Constructor to get the UserAuth class instance. * @since 8 - * @syscap SystemCapability.UserIAM.UserAuth + * @syscap SystemCapability.UserIAM.UserAuth.Core * @return Returns the UserAuth class instance. */ constructor(); @@ -139,7 +140,7 @@ declare namespace userAuth { /** * Get version information. * @since 8 - * @syscap SystemCapability.UserIAM.UserAuth + * @syscap SystemCapability.UserIAM.UserAuth.Core * @return Returns version information. */ getVersion() : number; @@ -147,7 +148,7 @@ declare namespace userAuth { /** * Check whether the authentication capability is available. * @since 8 - * @syscap SystemCapability.UserIAM.UserAuth + * @syscap SystemCapability.UserIAM.UserAuth.Core * @permission ohos.permission.ACCESS_BIOMETRIC * @param authType Credential type for authentication. * @param authTrustLevel Trust level of authentication result. @@ -158,7 +159,7 @@ declare namespace userAuth { /** * Executes authentication. * @since 8 - * @syscap SystemCapability.UserIAM.UserAuth + * @syscap SystemCapability.UserIAM.UserAuth.Core * @permission ohos.permission.ACCESS_BIOMETRIC * @param challenge pass in challenge value. * @param authType type of authentication. @@ -171,7 +172,7 @@ declare namespace userAuth { /** * Cancels authentication with ContextID. * @since 8 - * @syscap SystemCapability.UserIAM.UserAuth + * @syscap SystemCapability.UserIAM.UserAuth.Core * @permission ohos.permission.ACCESS_BIOMETRIC * @param contextID Cancel authentication and pass in ContextID. * @return Returns a number value indicating whether Cancel authentication was successful. @@ -183,6 +184,7 @@ declare namespace userAuth { /** * The authentication result code is returned through the callback. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core * @param result authentication result code. * @param extraInfo pass the specific information for different situation. * If the authentication is passed, the authentication token is returned in extrainfo, @@ -194,6 +196,7 @@ declare namespace userAuth { /** * During an authentication, the TipsCode is returned through the callback. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core * @param module the executor type for authentication. * @param acquire the tip code for different authentication executor. * @param extraInfo reserved parameter. @@ -204,6 +207,7 @@ declare namespace userAuth { /** * Authentication result: authentication token, remaining authentication times, freezing time. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core * @param token pass the authentication result if the authentication is passed. * @param remainTimes return the remaining authentication times if the authentication fails. * @param freezingTime return the freezing time if the authectication executor is locked. @@ -217,71 +221,83 @@ declare namespace userAuth { /** * Result code. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ enum ResultCode { /** * Indicates that the result is success or ability is supported. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ SUCCESS = 0, /** * Indicates the the result is failure or ability is not supported. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FAIL = 1, /** * Indicates other errors. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ GENERAL_ERROR = 2, /** * Indicates that this operation has been canceled. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ CANCELED = 3, /** * Indicates that this operation has timed out. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ TIMEOUT = 4, /** * Indicates that this authentication type is not supported. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ TYPE_NOT_SUPPORT = 5, /** * Indicates that the authentication trust level is not supported. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ TRUST_LEVEL_NOT_SUPPORT = 6, /** * Indicates that the authentication task is busy. Wait for a few seconds and try again. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ BUSY = 7, /** * Indicates incorrect parameters. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ INVALID_PARAMETERS = 8, /** * Indicates that the authenticator is locked. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ LOCKED = 9, /** * Indicates that the user has not enrolled the authenticator. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ NOT_ENROLLED = 10 } @@ -289,71 +305,83 @@ declare namespace userAuth { /** * Indicates the enumeration of prompt codes in the process of face authentication. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ enum FaceTips { /** * Indicates that the obtained facial image is too bright due to high illumination. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE_AUTH_TIP_TOO_BRIGHT = 1, /** * Indicates that the obtained facial image is too dark due to low illumination. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE_AUTH_TIP_TOO_DARK = 2, /** * Indicates that the face is too close to the device. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE_AUTH_TIP_TOO_CLOSE = 3, /** * Indicates that the face is too far away from the device. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE_AUTH_TIP_TOO_FAR = 4, /** * Indicates that the device is too high, and that only the upper part of the face is captured. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE_AUTH_TIP_TOO_HIGH = 5, /** * Indicates that the device is too low, and that only the lower part of the face is captured. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE_AUTH_TIP_TOO_LOW = 6, /** * Indicates that the device is deviated to the right, and that only the right part of the face is captured. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE_AUTH_TIP_TOO_RIGHT = 7, /** * Indicates that the device is deviated to the left, and that only the left part of the face is captured. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE_AUTH_TIP_TOO_LEFT = 8, /** * Indicates that the face moves too fast during facial information collection. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE_AUTH_TIP_TOO_MUCH_MOTION = 9, /** * Indicates that the face is not facing the device. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE_AUTH_TIP_POOR_GAZE = 10, /** * Indicates that no face is detected. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE_AUTH_TIP_NOT_DETECTED = 11, } @@ -361,41 +389,48 @@ declare namespace userAuth { /** * Indicates the enumeration of prompt codes in the process of fingerprint authentication. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ enum FingerprintTips { /** * Indicates that the image acquired is good. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FINGERPRINT_AUTH_TIP_GOOD = 0, /** * Indicates that the fingerprint image is too noisy due to suspected or detected dirt on sensor. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FINGERPRINT_AUTH_TIP_DIRTY = 1, /** * Indicates that the fingerprint image is too noisy to process due to a detected condition. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FINGERPRINT_AUTH_TIP_INSUFFICIENT = 2, /** * Indicates that only a partial fingerprint image is detected. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FINGERPRINT_AUTH_TIP_PARTIAL = 3, /** * Indicates that the fingerprint image is incomplete due to quick motion. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FINGERPRINT_AUTH_TIP_TOO_FAST = 4, /** * Indicates that the fingerprint image is unreadable due to lack of motion. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FINGERPRINT_AUTH_TIP_TOO_SLOW = 5 } @@ -403,17 +438,20 @@ declare namespace userAuth { /** * Credential type for authentication. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ enum UserAuthType { /** * Authentication type face. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FACE = 2, /** * Authentication type fingerprint. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ FINGERPRINT = 4 } @@ -421,29 +459,34 @@ declare namespace userAuth { /** * Trust level of authentication results. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ enum AuthTrustLevel { /** * Authentication result trusted level 1. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ ATL1 = 10000, /** * Authentication result trusted level 2. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ ATL2 = 20000, /** * Authentication result trusted level 3. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ ATL3 = 30000, /** * Authentication result trusted level 4. * @since 8 + * @syscap SystemCapability.UserIAM.UserAuth.Core */ ATL4 = 40000 }