diff --git a/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts b/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts index 959833aa70c3dd49e0249455a19a6ebc5550bb4a..9db28c4b994b2a2f6d040ac7b4dbccee5cef00a8 100644 --- a/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts +++ b/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts @@ -28,7 +28,7 @@ import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi Hide this for inner system use. * @StageModelOnly - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} */ export default class UserAuthExtensionAbility extends UIExtensionAbility { } \ No newline at end of file diff --git a/api/@ohos.userIAM.faceAuth.d.ts b/api/@ohos.userIAM.faceAuth.d.ts index e5f27404841dbafe888157a7aa03be1306c06b97..01ae3ddbe67f14b8a10096f1bbb25246e59e37c0 100644 --- a/api/@ohos.userIAM.faceAuth.d.ts +++ b/api/@ohos.userIAM.faceAuth.d.ts @@ -24,7 +24,7 @@ * * @namespace faceAuth * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth - * @since arkts {'1.1':'9','1.2':'20'} + * @since arkts {'1.1':'9','1.2':'22'} * @arkts 1.1&1.2 */ declare namespace faceAuth { @@ -33,7 +33,7 @@ declare namespace faceAuth { * * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'9','1.2':'20'} + * @since arkts {'1.1':'9','1.2':'22'} * @arkts 1.1&1.2 */ class FaceAuthManager { @@ -42,7 +42,7 @@ declare namespace faceAuth { * * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'9','1.2':'20'} + * @since arkts {'1.1':'9','1.2':'22'} * @arkts 1.1&1.2 */ constructor(); @@ -57,7 +57,7 @@ declare namespace faceAuth { * @throws { BusinessError } 12700001 - The service is unavailable. * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'9','1.2':'20'} + * @since arkts {'1.1':'9','1.2':'22'} * @arkts 1.1&1.2 */ setSurfaceId(surfaceId: string): void; diff --git a/api/@ohos.userIAM.userAccessCtrl.d.ts b/api/@ohos.userIAM.userAccessCtrl.d.ts index dc178074c0b5ab3985e3b266f88f18d8d5f6d852..95868fd29b496483da05f1615b0a7168c2f305a9 100644 --- a/api/@ohos.userIAM.userAccessCtrl.d.ts +++ b/api/@ohos.userIAM.userAccessCtrl.d.ts @@ -26,7 +26,7 @@ import userAuth from '@ohos.userIAM.userAuth'; * * @namespace userAccessCtrl * @syscap SystemCapability.UserIAM.UserAuth.Core - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ declare namespace userAccessCtrl { @@ -48,7 +48,7 @@ declare namespace userAccessCtrl { * @throws { BusinessError } 12500016 - AuthToken has expired. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ function verifyAuthToken(authToken: Uint8Array, allowableDuration: int): Promise; @@ -59,7 +59,7 @@ declare namespace userAccessCtrl { * @typedef AuthToken * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ interface AuthToken { @@ -69,7 +69,7 @@ declare namespace userAccessCtrl { * @type { Uint8Array } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ challenge: Uint8Array; @@ -80,7 +80,7 @@ declare namespace userAccessCtrl { * @type { userAuth.AuthTrustLevel } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ authTrustLevel: userAuth.AuthTrustLevel; @@ -91,7 +91,7 @@ declare namespace userAccessCtrl { * @type { userAuth.UserAuthType } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ authType: userAuth.UserAuthType; @@ -102,7 +102,7 @@ declare namespace userAccessCtrl { * @type { AuthTokenType } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ tokenType: AuthTokenType; @@ -113,7 +113,7 @@ declare namespace userAccessCtrl { * @type { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ userId: int; @@ -124,7 +124,7 @@ declare namespace userAccessCtrl { * @type { bigint } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ timeInterval: bigint; @@ -135,7 +135,7 @@ declare namespace userAccessCtrl { * @type { ?bigint } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ secureUid?: bigint; @@ -146,7 +146,7 @@ declare namespace userAccessCtrl { * @type { ?bigint } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ enrolledId?: bigint; @@ -157,7 +157,7 @@ declare namespace userAccessCtrl { * @type { ?bigint } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ credentialId?: bigint; @@ -169,7 +169,7 @@ declare namespace userAccessCtrl { * @enum { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ enum AuthTokenType { @@ -178,7 +178,7 @@ declare namespace userAccessCtrl { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ TOKEN_TYPE_LOCAL_AUTH = 0, @@ -188,7 +188,7 @@ declare namespace userAccessCtrl { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ TOKEN_TYPE_LOCAL_RESIGN = 1, @@ -198,7 +198,7 @@ declare namespace userAccessCtrl { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ TOKEN_TYPE_COAUTH = 2 diff --git a/api/@ohos.userIAM.userAuth.d.ts b/api/@ohos.userIAM.userAuth.d.ts index 53d88fc11ed906321be5c67ae9aff2ff2a4b131e..a8c9ff76137484430acd40867cfd18da183bc84c 100644 --- a/api/@ohos.userIAM.userAuth.d.ts +++ b/api/@ohos.userIAM.userAuth.d.ts @@ -39,7 +39,7 @@ import Context from './application/Context'; * @namespace userAuth * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ declare namespace userAuth { @@ -57,8 +57,7 @@ declare namespace userAuth { * * @constant * @syscap SystemCapability.UserIAM.UserAuth.Core - * @atomicservice - * @since 20 + * @since 22 * @arkts 1.2 */ const MAX_ALLOWABLE_REUSE_DURATION: int = 300000; @@ -695,7 +694,7 @@ declare namespace userAuth { * @enum { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ enum UserAuthType { @@ -710,7 +709,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ PIN = 1, @@ -726,7 +725,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ FACE = 2, @@ -742,7 +741,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ FINGERPRINT = 4, @@ -752,7 +751,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'14','1.2':'20'} + * @since arkts {'1.1':'14','1.2':'22'} * @arkts 1.1&1.2 */ PRIVATE_PIN = 16 @@ -773,7 +772,7 @@ declare namespace userAuth { * @enum { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ enum AuthTrustLevel { @@ -790,7 +789,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ ATL1 = 10000, @@ -808,7 +807,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ ATL2 = 20000, @@ -825,7 +824,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ ATL3 = 30000, @@ -842,7 +841,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ ATL4 = 40000 @@ -1086,7 +1085,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500013 - Operation failed because of PIN expired. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ function getAvailableStatus(authType: UserAuthType, authTrustLevel: AuthTrustLevel): void; @@ -1097,7 +1096,7 @@ declare namespace userAuth { * @typedef EnrolledState * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ interface EnrolledState { @@ -1107,7 +1106,7 @@ declare namespace userAuth { * @type { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ credentialDigest: int; @@ -1118,14 +1117,14 @@ declare namespace userAuth { * @type { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ credentialCount: int; } /** - * Obtains the credential state. + * Obtains information about the credentials enrolled. With this API, you can obtain the change of the credentials. * * @permission ohos.permission.ACCESS_BIOMETRIC * @param { UserAuthType } authType - Authentication type. @@ -1138,7 +1137,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500010 - The type of credential has not been enrolled. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ function getEnrolledState(authType: UserAuthType): EnrolledState; @@ -1167,7 +1166,7 @@ declare namespace userAuth { * @enum { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} * @arkts 1.1&1.2 */ enum WindowModeType { @@ -1176,7 +1175,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} * @arkts 1.1&1.2 */ DIALOG_BOX = 1, @@ -1186,7 +1185,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} * @arkts 1.1&1.2 */ FULLSCREEN = 2 @@ -1198,7 +1197,7 @@ declare namespace userAuth { * @enum { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ enum ReuseMode { @@ -1208,7 +1207,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ AUTH_TYPE_RELEVANT = 1, @@ -1219,7 +1218,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ AUTH_TYPE_IRRELEVANT = 2, @@ -1231,7 +1230,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} + * @since arkts {'1.1':'14','1.2':'22'} * @arkts 1.1&1.2 */ CALLER_IRRELEVANT_AUTH_TYPE_RELEVANT = 3, @@ -1242,7 +1241,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} + * @since arkts {'1.1':'14','1.2':'22'} * @arkts 1.1&1.2 */ CALLER_IRRELEVANT_AUTH_TYPE_IRRELEVANT = 4 @@ -1265,7 +1264,7 @@ declare namespace userAuth { * @typedef ReuseUnlockResult * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ interface ReuseUnlockResult { @@ -1275,7 +1274,7 @@ declare namespace userAuth { * @type { ReuseMode } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ reuseMode: ReuseMode; @@ -1287,7 +1286,7 @@ declare namespace userAuth { * @type { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ reuseDuration: int; @@ -1306,7 +1305,7 @@ declare namespace userAuth { * @typedef AuthParam * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ interface AuthParam { @@ -1324,7 +1323,7 @@ declare namespace userAuth { * @type { Uint8Array } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ challenge: Uint8Array; @@ -1342,7 +1341,7 @@ declare namespace userAuth { * @type { UserAuthType[] } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ authType: UserAuthType[]; @@ -1360,7 +1359,7 @@ declare namespace userAuth { * @type { AuthTrustLevel } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ authTrustLevel: AuthTrustLevel; @@ -1371,7 +1370,7 @@ declare namespace userAuth { * @type { ?ReuseUnlockResult } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ reuseUnlockResult?: ReuseUnlockResult; @@ -1383,7 +1382,7 @@ declare namespace userAuth { * @default The ID of the current user. The value is a positive integer greater than or equal to 0. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ userId?: int; @@ -1394,7 +1393,8 @@ declare namespace userAuth { * @type { ?boolean } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ skipLockedBiometricAuth?: boolean; } @@ -1412,7 +1412,7 @@ declare namespace userAuth { * @typedef WidgetParam * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ interface WidgetParam { @@ -1429,7 +1429,7 @@ declare namespace userAuth { * @type { string } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ title: string; @@ -1449,7 +1449,7 @@ declare namespace userAuth { * @type { ?string } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ navigationButtonText?: string; @@ -1461,7 +1461,7 @@ declare namespace userAuth { * @default WindowModeType.DIALOG_BOX * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} * @arkts 1.1&1.2 */ windowMode?: WindowModeType; @@ -1474,7 +1474,7 @@ declare namespace userAuth { * @type { ?Context } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ uiContext?: Context; @@ -1494,7 +1494,7 @@ declare namespace userAuth { * @typedef UserAuthResult * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ interface UserAuthResult { @@ -1512,7 +1512,7 @@ declare namespace userAuth { * @type { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ result: int; @@ -1525,12 +1525,12 @@ declare namespace userAuth { * @since 10 */ /** - * Authentication token information. + * The authentication result if the authentication is passed. * * @type { ?Uint8Array } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ token?: Uint8Array; @@ -1543,28 +1543,42 @@ declare namespace userAuth { * @since 10 */ /** - * Authentication type. + * Credential type for authentication succeed. * * @type { ?UserAuthType } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ authType?: UserAuthType; /** - * Credential state. + * The enrolled state for authentication succeed. EnrolledState would be returned when the authentication has + * passed. * * @type { ?EnrolledState } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ enrolledState?: EnrolledState; } + /** + * Called to return the authentication result. If the authentication is successful, + * UserAuthResult contains the token information. + * + * @typedef { function } AuthCallbackOnResultFunc + * @param { UserAuthResult } result - Authentication result information. + * @syscap SystemCapability.UserIAM.UserAuth.Core + * @atomicservice + * @since 22 + * @arkts 1.2 + */ + type AuthCallbackOnResultFunc = (result: UserAuthResult) => void; + /** * Asynchronous callback of authentication operation. * @@ -1578,7 +1592,7 @@ declare namespace userAuth { * @interface IAuthCallback * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ interface IAuthCallback { @@ -1600,17 +1614,18 @@ declare namespace userAuth { * @since 12 */ onResult(result: UserAuthResult): void; + /** * Called to return the authentication result. If the authentication is successful, * UserAuthResult contains the token information. * - * @type { function } + * @type { AuthCallbackOnResultFunc } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since 22 * @arkts 1.2 */ - onResult: (result: UserAuthResult) => void; + onResult: AuthCallbackOnResultFunc; } /** @@ -1619,7 +1634,8 @@ declare namespace userAuth { * @enum { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ enum UserAuthTipCode { /** @@ -1627,7 +1643,8 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ COMPARE_FAILURE = 1, @@ -1636,7 +1653,8 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ TIMEOUT = 2, @@ -1645,7 +1663,8 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ TEMPORARILY_LOCKED = 3, @@ -1654,7 +1673,8 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ PERMANENTLY_LOCKED = 4, @@ -1663,7 +1683,8 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ WIDGET_LOADED = 5, @@ -1672,7 +1693,8 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ WIDGET_RELEASED = 6, @@ -1681,7 +1703,8 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ COMPARE_FAILURE_WITH_FROZEN = 7 } @@ -1692,7 +1715,8 @@ declare namespace userAuth { * @typedef AuthTipInfo * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ interface AuthTipInfo { /** @@ -1701,7 +1725,8 @@ declare namespace userAuth { * @type { UserAuthType } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ tipType: UserAuthType; @@ -1711,7 +1736,8 @@ declare namespace userAuth { * @type { UserAuthTipCode } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ tipCode: UserAuthTipCode; } @@ -1723,7 +1749,8 @@ declare namespace userAuth { * @param { AuthTipInfo } authTipInfo - Tips returned during authentication process. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ type AuthTipCallback = (authTipInfo: AuthTipInfo) => void; @@ -1741,7 +1768,7 @@ declare namespace userAuth { * @interface UserAuthInstance * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ interface UserAuthInstance { @@ -1770,11 +1797,26 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'result', callback: IAuthCallback): void; + /** + * Subscribes to the user authentication result. + * + * @param { 'result' } type - Event type. The value is result, which indicates the authentication result. + * @param { IAuthCallback } callback - Callback used to return the user authentication result. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameter types. + *
3. Parameter verification failed. + * @throws { BusinessError } 12500002 - General operation error. + * @syscap SystemCapability.UserIAM.UserAuth.Core + * @since 22 + * @arkts 1.2 + */ + onResult(type: 'result', callback: IAuthCallback): void; + /** * Turn off widget authentication result event listening. * @@ -1804,11 +1846,30 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'result', callback?: IAuthCallback): void; + /** + * Unsubscribes from the user authentication result. + * + *

NOTE: + *
The UserAuthInstance instance used to invoke this API must be the one used to subscribe to the event. + *

+ * + * @param { 'result' } type - Event type. The value is result, which indicates the authentication result. + * @param { IAuthCallback } [callback] - Callback to unregister. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameter types. + *
3. Parameter verification failed. + * @throws { BusinessError } 12500002 - General operation error. + * @syscap SystemCapability.UserIAM.UserAuth.Core + * @since 22 + * @arkts 1.2 + */ + offResult(type: 'result', callback?: IAuthCallback): void; + /** * Start this authentication, an instance can only perform authentication once. * @@ -1830,8 +1891,8 @@ declare namespace userAuth { * @since 10 */ /** - * Start this authentication, an instance can only perform authentication once. - * + * Starts authentication. Each UserAuthInstance + * instance can be used for authentication only once. * @permission ohos.permission.ACCESS_BIOMETRIC * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -1876,7 +1937,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500013 - Operation failed because of PIN expired. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} * @arkts 1.1&1.2 */ start(): void; @@ -1906,7 +1967,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ cancel(): void; @@ -1923,6 +1984,18 @@ declare namespace userAuth { */ on(type: 'authTip', callback: AuthTipCallback): void; + /** + * Turn on authentication tip event listening. + * + * @param { 'authTip' } type - Indicates the type of event. + * @param { AuthTipCallback } callback - Indicates the listener. + * @throws { BusinessError } 12500002 - General operation error. + * @syscap SystemCapability.UserIAM.UserAuth.Core + * @since 22 + * @arkts 1.2 + */ + onAuthTip(type: 'authTip', callback: AuthTipCallback): void; + /** * Turn off authentication tip event listening. * @@ -1934,6 +2007,28 @@ declare namespace userAuth { * @since 20 */ off(type: 'authTip', callback?: AuthTipCallback): void; + + /** + * Turn off authentication tip event listening. + * + * @param { 'authTip' } type - Indicates the type of event. + * @param { AuthTipCallback } [callback] - Indicates the listener. + * @throws { BusinessError } 12500002 - General operation error. + * @syscap SystemCapability.UserIAM.UserAuth.Core + * @atomicservice + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 + */ + offAuthTip(type: 'authTip', callback?: AuthTipCallback): void; + + /** + * @arkts 1.2 + */ + overload on { onResult, onAuthTip }; + /** + * @arkts 1.2 + */ + overload off { offResult, offAuthTip }; } /** @@ -1971,7 +2066,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500006 - The authentication trust level is not supported. * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ function getUserAuthInstance(authParam: AuthParam, widgetParam: WidgetParam): UserAuthInstance; @@ -1982,7 +2077,7 @@ declare namespace userAuth { * @enum { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} * @arkts 1.1&1.2 */ enum NoticeType { @@ -1991,7 +2086,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} * @arkts 1.1&1.2 */ WIDGET_NOTICE = 1 @@ -2012,7 +2107,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} * @arkts 1.1&1.2 */ function sendNotice(noticeType: NoticeType, eventData: string): void; @@ -2030,7 +2125,7 @@ declare namespace userAuth { * @enum { int } * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ enum UserAuthResultCode { @@ -2045,7 +2140,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ SUCCESS = 12500000, @@ -2061,7 +2156,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ FAIL = 12500001, @@ -2077,7 +2172,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ GENERAL_ERROR = 12500002, @@ -2093,7 +2188,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ CANCELED = 12500003, @@ -2109,7 +2204,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ TIMEOUT = 12500004, @@ -2125,7 +2220,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ TYPE_NOT_SUPPORT = 12500005, @@ -2137,11 +2232,11 @@ declare namespace userAuth { * @since 9 */ /** - * The authentication trust level is not supported. + * Indicates that the authentication trust level is not supported. * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ TRUST_LEVEL_NOT_SUPPORT = 12500006, @@ -2153,11 +2248,11 @@ declare namespace userAuth { * @since 9 */ /** - * The system does not respond. + * Indicates that the authentication task is busy. Wait for a few seconds and try again. * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ BUSY = 12500007, @@ -2167,7 +2262,8 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ INVALID_PARAMETERS = 12500008, @@ -2178,11 +2274,11 @@ declare namespace userAuth { * @since 9 */ /** - * The authentication executor is locked. + * Indicates that the authenticator is locked. * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ LOCKED = 12500009, @@ -2194,11 +2290,11 @@ declare namespace userAuth { * @since 9 */ /** - * The user has not enrolled the specified system identity authentication credential. + * Indicates that the user has not enrolled the specified system identity authentication credential. * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ NOT_ENROLLED = 12500010, @@ -2210,32 +2306,32 @@ declare namespace userAuth { * @since 10 */ /** - * The user cancels the system authentication and selects a custom authentication of the application. + * Indicates that the user cancels the system authentication and selects a custom authentication of the application. * The caller needs to launch the custom authentication page. * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ CANCELED_FROM_WIDGET = 12500011, /** - * The authentication failed because the lock screen password has expired. + * Indicates that the authentication failed because the lock screen password has expired. * * @syscap SystemCapability.UserIAM.UserAuth.Core * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'22'} * @arkts 1.1&1.2 */ PIN_EXPIRED = 12500013, /** - * The AuthToken is invalid. + * Indicates that current operation failed because of authToken integrity check failed. * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ AUTH_TOKEN_CHECK_FAILED = 12500015, @@ -2246,7 +2342,7 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'18','1.2':'22'} * @arkts 1.1&1.2 */ AUTH_TOKEN_EXPIRED = 12500016, @@ -2256,7 +2352,8 @@ declare namespace userAuth { * * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ REUSE_AUTH_RESULT_FAILED = 12500017 } @@ -2268,7 +2365,7 @@ declare namespace userAuth { * @interface UserAuthWidgetMgr * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} * @arkts 1.1&1.2 */ interface UserAuthWidgetMgr { @@ -2286,7 +2383,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} * @arkts 1.1&1.2 */ on(type: 'command', callback: IAuthWidgetCallback): void; @@ -2304,7 +2401,7 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} * @arkts 1.1&1.2 */ off(type: 'command', callback?: IAuthWidgetCallback): void; @@ -2328,11 +2425,23 @@ declare namespace userAuth { * @throws { BusinessError } 12500002 - General operation error. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'22'} * @arkts 1.1&1.2 */ function getUserAuthWidgetMgr(version: int): UserAuthWidgetMgr; + /** + * Called to return the command sent from the user authentication framework to the user authentication widget. + * + * @typedef { function } AuthWidgetCallbackSendCommandFunc + * @param { string } cmdData - Command sent from the user authentication framework to the user authentication widget. + * @syscap SystemCapability.UserIAM.UserAuth.Core + * @systemapi Hide this for inner system use. + * @since 22 + * @arkts 1.2 + */ + type AuthWidgetCallbackSendCommandFunc = (cmdData: string) => void; + /** * Provides the callback for returning the commands sent from the user authentication framework * to the user authentication widget. @@ -2340,29 +2449,30 @@ declare namespace userAuth { * @interface IAuthWidgetCallback * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10','1.2':'22'} + * @arkts 1.1&1.2 */ interface IAuthWidgetCallback { /** * Called to return the command sent from the user authentication framework to the user authentication widget. * - * @param { string } cmdData - Command sent from the user authentication framework to the user - * authentication widget. + * @param { string } cmdData - Command sent from the user authentication framework to the user authentication widget. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. * @since 10 */ sendCommand(cmdData: string): void; + /** * Called to return the command sent from the user authentication framework to the user authentication widget. * - * @type { function } + * @type { AuthWidgetCallbackSendCommandFunc } * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since 20 + * @since 22 * @arkts 1.2 */ - sendCommand: (cmdData: string) => void; + sendCommand: AuthWidgetCallbackSendCommandFunc; } /** @@ -2378,7 +2488,8 @@ declare namespace userAuth { * @throws { BusinessError } 12500017 - Failed to reuse authentication result. * @syscap SystemCapability.UserIAM.UserAuth.Core * @systemapi Hide this for inner system use. - * @since 20 + * @since arkts {'1.1':'20','1.2':'22'} + * @arkts 1.1&1.2 */ function queryReusableAuthResult(authParam: AuthParam): Uint8Array; }