• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# 用户身份认证子系统JS API变更
2
3OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,用户身份认证子系统的API变更如下:
4
5## 接口变更
6
7| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 |
8|---|---|---|---|
9| ohos.userIAM.userAuth | AuthTrustLevel | ATL4 = 40000 | 新增 |
10| ohos.userIAM.userAuth | AuthTrustLevel | ATL3 = 30000 | 新增 |
11| ohos.userIAM.userAuth | AuthTrustLevel | ATL2 = 20000 | 新增 |
12| ohos.userIAM.userAuth | AuthTrustLevel | ATL1 = 10000 | 新增 |
13| ohos.userIAM.userAuth | UserAuthType | FINGERPRINT = 4 | 新增 |
14| ohos.userIAM.userAuth | UserAuthType | FACE = 2 | 新增 |
15| ohos.userIAM.userAuth | FingerprintTips | FINGERPRINT_AUTH_TIP_TOO_SLOW = 5 | 新增 |
16| ohos.userIAM.userAuth | FingerprintTips | FINGERPRINT_AUTH_TIP_TOO_FAST = 4 | 新增 |
17| ohos.userIAM.userAuth | FingerprintTips | FINGERPRINT_AUTH_TIP_PARTIAL = 3 | 新增 |
18| ohos.userIAM.userAuth | FingerprintTips | FINGERPRINT_AUTH_TIP_INSUFFICIENT = 2 | 新增 |
19| ohos.userIAM.userAuth | FingerprintTips | FINGERPRINT_AUTH_TIP_DIRTY = 1 | 新增 |
20| ohos.userIAM.userAuth | FingerprintTips | FINGERPRINT_AUTH_TIP_GOOD = 0 | 新增 |
21| ohos.userIAM.userAuth | FaceTips | FACE_AUTH_TIP_NOT_DETECTED = 11 | 新增 |
22| ohos.userIAM.userAuth | FaceTips | FACE_AUTH_TIP_POOR_GAZE = 10 | 新增 |
23| ohos.userIAM.userAuth | FaceTips | FACE_AUTH_TIP_TOO_MUCH_MOTION = 9 | 新增 |
24| ohos.userIAM.userAuth | FaceTips | FACE_AUTH_TIP_TOO_LEFT = 8 | 新增 |
25| ohos.userIAM.userAuth | FaceTips | FACE_AUTH_TIP_TOO_RIGHT = 7 | 新增 |
26| ohos.userIAM.userAuth | FaceTips | FACE_AUTH_TIP_TOO_LOW = 6 | 新增 |
27| ohos.userIAM.userAuth | FaceTips | FACE_AUTH_TIP_TOO_HIGH = 5 | 新增 |
28| ohos.userIAM.userAuth | FaceTips | FACE_AUTH_TIP_TOO_FAR = 4 | 新增 |
29| ohos.userIAM.userAuth | FaceTips | FACE_AUTH_TIP_TOO_CLOSE = 3 | 新增 |
30| ohos.userIAM.userAuth | FaceTips | FACE_AUTH_TIP_TOO_DARK = 2 | 新增 |
31| ohos.userIAM.userAuth | FaceTips | FACE_AUTH_TIP_TOO_BRIGHT = 1 | 新增 |
32| ohos.userIAM.userAuth | ResultCode | NOT_ENROLLED = 10 | 新增 |
33| ohos.userIAM.userAuth | ResultCode | LOCKED = 9 | 新增 |
34| ohos.userIAM.userAuth | ResultCode | INVALID_PARAMETERS = 8 | 新增 |
35| ohos.userIAM.userAuth | ResultCode | BUSY = 7 | 新增 |
36| ohos.userIAM.userAuth | ResultCode | TRUST_LEVEL_NOT_SUPPORT = 6 | 新增 |
37| ohos.userIAM.userAuth | ResultCode | TYPE_NOT_SUPPORT = 5 | 新增 |
38| ohos.userIAM.userAuth | ResultCode | TIMEOUT = 4 | 新增 |
39| ohos.userIAM.userAuth | ResultCode | CANCELED = 3 | 新增 |
40| ohos.userIAM.userAuth | ResultCode | GENERAL_ERROR = 2 | 新增 |
41| ohos.userIAM.userAuth | ResultCode | FAIL = 1 | 新增 |
42| ohos.userIAM.userAuth | ResultCode | SUCCESS = 0 | 新增 |
43| ohos.userIAM.userAuth | AuthResult | freezingTime ?: number; | 新增 |
44| ohos.userIAM.userAuth | AuthResult | remainTimes ?: number; | 新增 |
45| ohos.userIAM.userAuth | AuthResult | token ?: Uint8Array; | 新增 |
46| ohos.userIAM.userAuth | IUserAuthCallback | onAcquireInfo ?: (module : number, acquire : number, extraInfo : any) => void; | 新增 |
47| ohos.userIAM.userAuth | IUserAuthCallback | onResult: (result : number, extraInfo : AuthResult) => void; | 新增 |
48| ohos.userIAM.userAuth | UserAuth | cancelAuth(contextID : Uint8Array) : number; | 新增 |
49| ohos.userIAM.userAuth | UserAuth | auth(challenge: Uint8Array, authType: UserAuthType, authTrustLevel: AuthTrustLevel, callback: IUserAuthCallback): Uint8Array; | 新增 |
50| ohos.userIAM.userAuth | UserAuth | getAvailableStatus(authType : UserAuthType, authTrustLevel : AuthTrustLevel) : number; | 新增 |
51| ohos.userIAM.userAuth | UserAuth | getVersion() : number; | 新增 |
52| ohos.userIAM.userAuth | UserAuth | constructor(); | 新增 |
53| ohos.userIAM.userAuth | userAuth | function getAuthenticator(): Authenticator; | 新增 |
54| ohos.userIAM.userAuth | Authenticator | execute(type: AuthType, level: SecureLevel, callback: AsyncCallback\<number>): void;<br>execute(type: AuthType, level: SecureLevel): Promise\<number>; | 新增 |
55| ohos.userIAM.userAuth | AuthenticationResult | GENERAL_ERROR = 100 | 新增 |
56| ohos.userIAM.userAuth | AuthenticationResult | NOT_ENROLLED = 8 | 新增 |
57| ohos.userIAM.userAuth | AuthenticationResult | LOCKED = 7 | 新增 |
58| ohos.userIAM.userAuth | AuthenticationResult | INVALID_PARAMETERS = 6 | 新增 |
59| ohos.userIAM.userAuth | AuthenticationResult | BUSY = 5 | 新增 |
60| ohos.userIAM.userAuth | AuthenticationResult | CAMERA_FAIL = 4 | 新增 |
61| ohos.userIAM.userAuth | AuthenticationResult | TIMEOUT = 3 | 新增 |
62| ohos.userIAM.userAuth | AuthenticationResult | CANCELED = 2 | 新增 |
63| ohos.userIAM.userAuth | AuthenticationResult | COMPARE_FAILURE = 1 | 新增 |
64| ohos.userIAM.userAuth | AuthenticationResult | SUCCESS = 0 | 新增 |
65| ohos.userIAM.userAuth | AuthenticationResult | NO_SUPPORT = -1 | 新增 |
66