From 33e48552301011083a86a6d54b9b114a208d3cb5 Mon Sep 17 00:00:00 2001 From: hu-jixiang1 Date: Thu, 10 Mar 2022 19:43:36 +0800 Subject: [PATCH] fixed 3ce08cf from https://gitee.com/hu-jixiang1/xts_acts/pulls/2346 hujixiang Signed-off-by: hu-jixiang1 Change-Id: I0b5de1c498a5a439d0f4b391b12a0be14c2983f6 --- .../userauthpart2/entry/src/main/config.json | 23 +- .../entry/src/main/js/test/List.test.js | 14 +- .../src/main/js/test/Publicfunction-n.js | 1 + ...rity_IAM_Coauth_DFX_CallbackJsunit.test.js | 6 +- ...ity_IAM_Coauth_Func_CallbackJsunit.test.js | 100 ++- ...ity_IAM_Coauth_MTBF_CallbackJsunit.test.js | 255 ------- ...curity_IAM_Face_DFX_CallbackJsunit.test.js | 6 +- ...urity_IAM_Face_Func_CallbackJsunit.test.js | 8 +- ...urity_IAM_Face_MTBF_CallbackJsunit.test.js | 233 ------- ...y_IAM_Interface_DFX_CallbackJsunit.test.js | 637 ++++++++++++++++++ ..._IAM_Interface_Func_CallbackJsunit.test.js | 8 +- ..._IAM_Interface_MTBF_CallbackJsunit.test.js | 196 ------ ...ecurity_IAM_PIN_DFX_CallbackJsunit.test.js | 6 +- ...curity_IAM_PIN_Func_CallbackJsunit.test.js | 41 +- ...ecurity_IAM_PIN_Kit_CallbackJsunit.test.js | 44 +- ...curity_IAM_PIN_MTBF_CallbackJsunit.test.js | 212 ------ .../userauthpart2/signature/.DS_Store | Bin 0 -> 6148 bytes .../signature/openharmony_sx.p7b | Bin 3437 -> 3447 bytes .../signature/openharmony_sx_base.p7b | Bin 0 -> 3437 bytes 19 files changed, 805 insertions(+), 985 deletions(-) delete mode 100644 useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_MTBF_CallbackJsunit.test.js delete mode 100644 useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_MTBF_CallbackJsunit.test.js create mode 100644 useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_DFX_CallbackJsunit.test.js delete mode 100644 useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_MTBF_CallbackJsunit.test.js delete mode 100644 useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_MTBF_CallbackJsunit.test.js create mode 100644 useriam/face_auth/js_api_test/function_test/userauthpart2/signature/.DS_Store create mode 100644 useriam/face_auth/js_api_test/function_test/userauthpart2/signature/openharmony_sx_base.p7b diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/config.json b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/config.json index 3a9c1d22d..d87573df9 100644 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/config.json +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/config.json @@ -64,20 +64,19 @@ ], "reqPermissions": [ { - "reason": "reason_manage_face", - "usedScene": { - "ability": ["com.myface.Ability","com.myface.AbilityBackground"], - "when": "always" - }, - "name": "ohos.permission.MANAGE_FACE" + "name": "ohos.permission.ACCESS_BIOMETRIC" }, { - "reason": "reason_access_biometric", - "usedScene": { - "ability": ["com.mybiometric.Ability","com.mybiometric.AbilityBackground"], - "when": "always" - }, - "name": "ohos.permission.ACCESS_BIOMETRIC" + "name": "ohos.permission.USE_USER_IDM" + }, + { + "name": "ohos.permission.MANAGE_USER_IDM" + }, + { + "name": "ohos.permission.ACCESS_USER_AUTH_INTERNAL" + }, + { + "name": "ohos.permission.ACCESS_PIN_AUTH" } ] } diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/List.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/List.test.js index 3f754e319..d1487a5e5 100644 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/List.test.js +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/List.test.js @@ -13,10 +13,16 @@ * limitations under the License. */ -require('./Security_IAM_PIN_Kit_CallbackJsunit.test.js') -require('./Security_IAM_PIN_Func_CallbackJsunit.test.js') require('./Security_IAM_PIN_DFX_CallbackJsunit.test.js') + +// require('./mytest.test.js') +require('./Security_IAM_PIN_Func_CallbackJsunit.test.js') +require('./Security_IAM_PIN_Kit_CallbackJsunit.test.js') +require('./Security_IAM_Face_DFX_CallbackJsunit.test.js') +require('./Security_IAM_Face_Func_CallbackJsunit.test.js') +require('./Security_IAM_Interface_DFX_CallbackJsunit.test.js') +require('./Security_IAM_Interface_Func_CallbackJsunit.test.js') require('./Security_IAM_Coauth_DFX_CallbackJsunit.test.js') require('./Security_IAM_Coauth_Func_CallbackJsunit.test.js') -require('./Security_IAM_Face_DFX_CallbackJsunit.test.js') -require('./Security_IAM_Face_Func_CallbackJsunit.test.js') \ No newline at end of file + + diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Publicfunction-n.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Publicfunction-n.js index c9975e4a0..68ebe14c3 100644 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Publicfunction-n.js +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Publicfunction-n.js @@ -368,6 +368,7 @@ function publicsetProperty(UserAuth,SetPropertyRequest,callback){ console.info('testFace publicsetProperty in try'); console.info('testFace publicsetProperty UserAuth = ' + UserAuth); UserAuth.setProperty(SetPropertyRequest,function (AsyncCallback) { + console.log("testFace faceDemo setProperty inside = ") console.log("testFace faceDemo setProperty AsyncCallback = " + JSON.stringify(AsyncCallback)) callback(AsyncCallback) }) diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_DFX_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_DFX_CallbackJsunit.test.js index c93cf134f..96d9172e8 100644 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_DFX_CallbackJsunit.test.js +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_DFX_CallbackJsunit.test.js @@ -14,9 +14,9 @@ */ import {describe, it, expect} from 'deccjsunit/index' -import userAuth from '@ohos.userauth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' +import userAuth from '@ohos.userAuth' +import userIDM from '@ohos.userIDM' +import pinAuth from '@ohos.pinAuth' import * as publicFC from './Publicfunction-n' let UserIDM = userIDM.constructor() diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_Func_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_Func_CallbackJsunit.test.js index 1aee1ad9d..867e07ac1 100644 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_Func_CallbackJsunit.test.js +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_Func_CallbackJsunit.test.js @@ -15,9 +15,9 @@ import {describe, it, expect} from 'deccjsunit/index' -import userAuth from '@ohos.userauth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' +import userAuth from '@ohos.userAuth' +import userIDM from '@ohos.userIDM' +import pinAuth from '@ohos.pinAuth' import * as publicFC from './Publicfunction-n' @@ -292,8 +292,10 @@ describe('userauthTest', function () { publicFC.publicgetallAuthInfo(UserIDM,function(AsyncCallback) { console.log("testFace Coauth_Func_0106 getAuthInfo = " + JSON.stringify(AsyncCallback)) - expect(AuthSubType.PIN_SIX).assertEqual(AsyncCallback[0].authSubType); - expect(AuthSubType.FACE_2D).assertEqual(AsyncCallback[1].authSubType); + expect(AuthSubType.PIN_SIX).assertEqual(AsyncCallback[1].authSubType); + expect(AuthType.PIN).assertEqual(AsyncCallback[1].authType); + expect(AuthSubType.FACE_2D).assertEqual(AsyncCallback[0].authSubType); + expect(AuthType.FACE).assertEqual(AsyncCallback[0].authType); publicFC.publicdelUser(UserIDM,token,function(onresult){ console.log("testFace Coauth_Func_0106delUser="+ onresult.delUserresult) publicFC.publicCloseSession(UserIDM,function(data){ @@ -489,22 +491,22 @@ describe('userauthTest', function () { function (data) { console.info("Security_IAM_Coauth_Func_0112 authresult1 = " + data.authresult); let authresult1 = data.authresult - expect(ResultCode.AUTH_FAIL).assertEqual(authresult1); + expect(ResultCode.FAIL).assertEqual(authresult1); publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { console.info("Security_IAM_Coauth_Func_0112 authresult2 = " + data.authresult); let authresult2 = data.authresult - expect(ResultCode.AUTH_FAIL).assertEqual(authresult2); + expect(ResultCode.FAIL).assertEqual(authresult2); publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { console.info("Security_IAM_Coauth_Func_0112 authresult3 =" + data.authresult); let authresult3 = data.authresult - expect(ResultCode.AUTH_FAIL).assertEqual(authresult3); + expect(ResultCode.FAIL).assertEqual(authresult3); publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { console.info("Coauth_Func_0112 authresult4 = " + data.authresult); let authresult4 = data.authresult - expect(ResultCode.AUTH_FAIL).assertEqual(authresult4); + expect(ResultCode.FAIL).assertEqual(authresult4); publicFC.publicgetProperty(UserAuth,GetPropertyRequestpin, function(data){ expect(1).assertEqual(data.remainTimes); publicFC.publicunRegisterInputer(PinAuth, async function (data) { @@ -554,6 +556,76 @@ describe('userauthTest', function () { } }) + it('Security_IAM_Coauth_Func_0122', 0, async function (done) { + try { + publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata) + let challenge ; + publicFC.publicOpenSession(UserIDM, function (data) { + console.info('Security_IAM_Coauth_Func_0122 openSession challenge = ' + data); + challenge = data; + publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, function (onresult) { + console.info('Security_IAM_Coauth_Func_0122 addCredential Result1 = ' + JSON.stringify(onresult)); + let info101; + publicFC.publicauth(UserAuth,challenge,AuthType.PIN,AuthTurstLevel.ATL1, function (data) { + console.info('Coauth_Func_0122 auth onResult = ' + JSON.stringify(data)); + info101 = data; + let token = info101.authextr.token; + CredentialInfoface2d.token = token; + let addfaceresult; + publicFC.publicaddCredential(UserIDM,CredentialInfoface2d, function (onresult) { + console.info('Coauth_Func_0122 addCredential Result2=' + JSON.stringify(onresult)); + addfaceresult = onresult; + console.info('Coauth_Func_0122 publicaddCredential = ' + addfaceresult.addCredresult); + expect(ResultCode.SUCCESS).assertEqual(addfaceresult.addCredresult); + publicFC.publicauth(UserAuth,challenge,AuthType.FACE,10000, async function (data) { +// console.info('testFace AuthTest_0101 onResult = ' + JSON.stringify(data)); + let faceauth101 = data; + console.info('Coauth_Func_0122 publicauth = ' + faceauth101.authresult); + expect(ResultCode.SUCCESS).assertEqual(faceauth101.authresult); + let authresult; + let contextID = await publicFC.publicauth(UserAuth,challenge,AuthType.FACE,10000, + function (data) { + console.info('Coauth_Func_0122 addCred='+ JSON.stringify(data.authresult)); + authresult = data.authresult; + }, function (onacquireinfo) { + }) + let cancelresult = publicFC.publicgecancelAuth(UserAuth,contextID); + await sleep(100); + if(cancelresult == 1){ + console.info('AuthTest_0101 cancel = 1 authresult = ' + authresult); + expect(ResultCode.SUCCESS).assertEqual(authresult); + }else if(cancelresult == 0){ + console.info('AuthTest_0101 cancel = 0 authresult = ' + authresult); + console.info('AuthTest_0101 cancel = 0 ResultCode.FAIL = ' + ResultCode.FAIL); + expect(ResultCode.CANCELED).assertEqual(authresult); + } + console.info('testFace AuthTest_0101 onResult = ' + JSON.stringify(data)); + await publicFC.publicdelUser(UserIDM,token, function (data) { + console.info('AuthTest_0101 delUser = ' + JSON.stringify(data)); + publicFC.publicCloseSession(UserIDM, function (data) { + console.info('AuthTest_0101 closeSession'); + publicFC.publicunRegisterInputer(PinAuth, function (data) { + console.info('AuthTest_0101 unRegister'); + done(); + }) + }) + }, function (onacquireinfo) { + }) + }, function (onacquireinfo) { + }) + }, function (onacquireinfo) { + }) + }, function (data) { + }) + }, function (onacquireinfo) { + }) + }) + } catch (e) { + console.log("AuthTest_0101 fail " + e); + expect(null).assertFail(); + } + }) + it('Security_IAM_Coauth_Func_0113', 3, async function (done) { console.info('testFace Security_IAM_Coauth_Func_0113 start'); try { @@ -576,23 +648,23 @@ describe('userauthTest', function () { await publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { let authresult1 = data.authresult - expect(ResultCode.AUTH_FAIL).assertEqual(authresult1); + expect(ResultCode.FAIL).assertEqual(authresult1); publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { let authresult2 = data.authresult - expect(ResultCode.AUTH_FAIL).assertEqual(authresult2); + expect(ResultCode.FAIL).assertEqual(authresult2); publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { let authresult3 = data.authresult - expect(ResultCode.AUTH_FAIL).assertEqual(authresult3); + expect(ResultCode.FAIL).assertEqual(authresult3); publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { let authresult4 = data.authresult - expect(ResultCode.AUTH_FAIL).assertEqual(authresult4); + expect(ResultCode.FAIL).assertEqual(authresult4); publicFC.publicauth( UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { let authresult5 = data.authresult - expect(ResultCode.AUTH_FAIL).assertEqual(authresult5); + expect(ResultCode.FAIL).assertEqual(authresult5); publicFC.publicgetProperty(UserAuth,GetPropertyRequestpin, function(data){ expect(0).assertEqual(data.remainTimes); diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_MTBF_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_MTBF_CallbackJsunit.test.js deleted file mode 100644 index 1e4e004fb..000000000 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Coauth_MTBF_CallbackJsunit.test.js +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {describe, it, expect} from 'deccjsunit/index' -import userAuth from '@ohos.userauth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' -import * as publicFC from './Publicfunction-n' - -let UserIDM = userIDM.constructor() -let PinAuth = pinAuth.constructor() -let UserAuth = userAuth.constructor() - -let AuthType = { - PIN : 1, - FACE : 2 -} -let AuthSubType = { - PIN_SIX : 10000, - PIN_NUMBER : 10001, - PIN_MIXED : 10002, - FACE_2D : 20000, - FACE_3D : 20001 -} -let AuthTurstLevel = { - ATL1 : 10000, - ATL2 : 20000, - ATL3 : 30000, - ATL4 : 40000 -} - -let userID = { - User1: 100, - User2: 2, - User3: 3, - User4: 4, - User5: 5 -} - -let CredentialInfoface2d = { - credType: AuthType.FACE, - credSubType: AuthSubType.FACE_2D, - token: null -} - -let ResultCode = { - SUCCESS : 0, - FAIL : 1, - GENERAL_ERROR : 2, - CANCELED : 3, - TIMEOUT : 4, - TYPE_NOT_SUPPORT : 5, - TRUST_LEVEL_NOT_SUPPORT : 6, - BUSY : 7, - INVALID_PARAMETERS : 8, - LOCKED : 9, - NOT_ENROLLED : 10 -} - -let Inputerdata = new Uint8Array([1,2,3,4,5,6]); - -let CredentialInfopinsix = { - credType: AuthType.PIN, - credSubType: AuthSubType.PIN_SIX, - token: null -} - -function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); -} - -function authcycle(challenge,fcycle){ - let finishicon = 0 - let token; - for(let i = 0; i < 5; i++){ - //未到达10个认证时,完成认证 - //闭包方法 - (function c(output){ - publicFC.publicauth(UserAuth ,challenge,AuthType.PIN,AuthTurstLevel.ATL1, - function (data) { - expect(true).assertEqual(data.authresult); - console.info('testFace Coauth_Auth_MTBF_0101 pinauth '+output + '=' + data.authresult); - if(i == 4){ - finishicon = finishicon + 1 - token = data.authextr.token - } - }, - function(data){ - }) - publicFC.publicauth(UserAuth ,challenge,AuthType.FACE,AuthTurstLevel.ATL1, - function (data) { - expect(true).assertEqual(data.authresult); - console.info('testFace Coauth_Auth_MTBF_0101 faceauth '+output + '=' + data.authresult); - if(i == 4){ - finishicon = finishicon + 1 - } - }, - function(data){ - }) - })(i) - } - publicFC.publicauth(UserAuth, challenge,AuthType.FACE,AuthTurstLevel.ATL1, - async function (data) { - console.info('testFace Coauth_Auth_MTBF_0101 auth11 =' + data.authresult); - if(data.authresult == ResultCode.SUCCESS){ - } - while(finishicon < 2){ - await sleep(100); - } - fcycle(data.authresult) - }, - function(data){ - }) -} - -function authUsercycle(challenge,fcycle){ - let finishicon = 0 - for(let i = 0; i < 10; i++){ - //未到达10个认证时,完成认证 - //闭包方法 - (function c(output){ - publicFC.publicauthUser(UserAuth ,userID.User1,challenge,AuthType.PIN,AuthTurstLevel.ATL1, - function (data) { - expect(true).assertEqual(data.authresult); - console.info('testFace FACE_Auth_MTBF_0102 auth '+output + '=' + data.authresult); - if(i == 4){ - finishicon = finishicon + 1 - } - }, - function(data){ - }) - publicFC.publicauthUser(UserAuth ,userID.User1,challenge,AuthType.PIN,AuthTurstLevel.ATL1, - function (data) { - expect(true).assertEqual(data.authresult); - console.info('testFace FACE_Auth_MTBF_0102 auth '+output + '=' + data.authresult); - if(i == 4){ - finishicon = finishicon + 1 - } - }, - function(data){ - }) - })(i) - } - publicFC.publicauthUser(UserAuth, userID.User1,challenge,AuthType.FACE,AuthTurstLevel.ATL1, - async function (data) { - console.info('testFace FACE_Auth_MTBF_0102 auth11 =' + data.authresult); - if(data.authresult == ResultCode.SUCCESS){ - } - while(finishicon < 2){ - await sleep(100); - } - fcycle(data.authresult) - }, - function(data){ - }) -} - -describe('userauthTest', function () { - - it('Security_IAM_FACE_Auth_MTBF_0101', 4, async function (done) { - try { - publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata); - let challenge ; - publicFC.publicOpenSession(UserIDM, function (data) { - console.info('testFace FACE_Auth_MTBF_0101 OpenSession challenge = ' + data); - challenge = data; - publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, function (data) { - console.info('testFace FACE_Auth_MTBF_0101 addCredential onResult = ' + JSON.stringify(data)); - publicFC.publicauth(UserAuth,challenge,AuthType.PIN,AuthTurstLevel.ATL1, function (data) { - console.info('FACE_Auth_MTBF_0101 auth onResult = ' + JSON.stringify(data)); - let info101 = data; - let token = info101.authextr.token; - CredentialInfoface2d.token = token; - publicFC.publicaddCredential(UserIDM,CredentialInfoface2d, function (onresult) { - console.info('testface FACE_Auth_MTBF_0101 addCredential=' + JSON.stringify(onresult)); - authcycle(challenge,function(data){ - publicFC.publicdelUser(UserIDM,token, function (data) { - console.info('testFace FACE_Auth_MTBF_0101 delUser = ' + JSON.stringify(data)); - publicFC.publicCloseSession(UserIDM, function (data) { - console.info('testFace FACE_Auth_MTBF_0101 publicCloseSession'); - publicFC.publicunRegisterInputer(PinAuth, function (data) { - console.info('testFace FACE_Auth_MTBF_0101 publicunRegisterInputer'); - done(); - }) - }) - }, function (data) { - }) - }) - }, function (data) { - }) - }, function (data) { - }) - }, function (data) { - }) - }) - } catch (e) { - console.log("FACE_Auth_MTBF_0101 fail " + e); - expect(null).assertFail(); - } - }) - - it('Security_IAM_FACE_Auth_MTBF_0102', 4, async function (done) { - try { - publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata); - let challenge ; - publicFC.publicOpenSession(UserIDM, function (data) { - console.info('testFace FACE_Auth_MTBF_0102 OpenSession challenge = ' + data); - challenge = data; - publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, function (data) { - console.info('testFace FACE_Auth_MTBF_0102 addCredential onResult = ' + JSON.stringify(data)); - publicFC.publicauth(UserAuth,challenge,AuthType.PIN,AuthTurstLevel.ATL1, function (data) { - console.info('testface FACE_Auth_MTBF_0102 auth onResult = ' + JSON.stringify(data)); - let info101 = data; - let token = info101.authextr.token; - CredentialInfoface2d.token = token; - publicFC.publicaddCredential(UserIDM,CredentialInfoface2d, function (onresult) { - console.info('FACE_Auth_MTBF_0102 addCredential Result2=' + JSON.stringify(onresult)); - authUsercycle(challenge,function(data){ - publicFC.publicdelUser(UserIDM,token, function (data) { - console.info('testFace FACE_Auth_MTBF_0102 delUser = ' + JSON.stringify(data)); - publicFC.publicCloseSession(UserIDM, function (data) { - console.info('testFace FACE_Auth_MTBF_0102 publicCloseSession'); - publicFC.publicunRegisterInputer(PinAuth, function (data) { - console.info('testFace FACE_Auth_MTBF_0102 publicunRegisterInputer'); - done(); - }) - }) - }, function (data) { - }) - }) - }, function (data) { - }) - }, function (data) { - }) - }, function (data) { - }) - }) - } catch (e) { - console.log("FACE_Auth_MTBF_0102 fail " + e); - expect(null).assertFail(); - } - }) -}) diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_DFX_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_DFX_CallbackJsunit.test.js index 80ea3baa6..77cec212a 100644 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_DFX_CallbackJsunit.test.js +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_DFX_CallbackJsunit.test.js @@ -14,9 +14,9 @@ */ import {describe, it, expect} from 'deccjsunit/index' -import userAuth from '@ohos.userauth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' +import userAuth from '@ohos.userAuth' +import userIDM from '@ohos.userIDM' +import pinAuth from '@ohos.pinAuth' import * as publicFC from './Publicfunction-n' let UserIDM = userIDM.constructor() diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_Func_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_Func_CallbackJsunit.test.js index cd3d4a7cf..92272fb5b 100644 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_Func_CallbackJsunit.test.js +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_Func_CallbackJsunit.test.js @@ -14,14 +14,14 @@ */ import {describe, it, expect} from 'deccjsunit/index' -import userIAM from '@ohos.UserIAM.userAuth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' +import userAuth from '@ohos.userAuth' +import userIDM from '@ohos.userIDM' +import pinAuth from '@ohos.pinAuth' import * as publicFC from './Publicfunction-n.js' let UserIDM = userIDM.constructor() let PinAuth = pinAuth.constructor() -let UserAuth = userIAM.constructor() +let UserAuth = userAuth.constructor() let AuthType = { PIN : 1, diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_MTBF_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_MTBF_CallbackJsunit.test.js deleted file mode 100644 index ee855c8cf..000000000 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Face_MTBF_CallbackJsunit.test.js +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {describe, it, expect} from 'deccjsunit/index' -import userAuth from '@ohos.userauth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' -import * as publicFC from './Publicfunction-n' - -let UserIDM = userIDM.constructor() -let PinAuth = pinAuth.constructor() -let UserAuth = userAuth.constructor() - -let AuthType = { - PIN : 1, - FACE : 2 -} -let AuthSubType = { - PIN_SIX : 10000, - PIN_NUMBER : 10001, - PIN_MIXED : 10002, - FACE_2D : 20000, - FACE_3D : 20001 -} -let AuthTurstLevel = { - ATL1 : 10000, - ATL2 : 20000, - ATL3 : 30000, - ATL4 : 40000 -} - -let userID = { - User1: 100, - User2: 2, - User3: 3, - User4: 4, - User5: 5 -} - -let CredentialInfoface2d = { - credType: AuthType.FACE, - credSubType: AuthSubType.FACE_2D, - token: null -} - -let ResultCode = { - SUCCESS : 0, - FAIL : 1, - GENERAL_ERROR : 2, - CANCELED : 3, - TIMEOUT : 4, - TYPE_NOT_SUPPORT : 5, - TRUST_LEVEL_NOT_SUPPORT : 6, - BUSY : 7, - INVALID_PARAMETERS : 8, - LOCKED : 9, - NOT_ENROLLED : 10 -} - -let Inputerdata = new Uint8Array([1,2,3,4,5,6]); - -let CredentialInfopinsix = { - credType: AuthType.PIN, - credSubType: AuthSubType.PIN_SIX, - token: null -} - -function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); -} - -function authcycle(challenge,fcycle){ - let finishicon = 0 - for(let i = 0; i < 10; i++){ - //未到达10个认证时,完成认证 - //闭包方法 - (function c(output){ - publicFC.publicauth(UserAuth ,challenge,AuthType.FACE,AuthTurstLevel.ATL1, - function (data) { - expect(true).assertEqual(data.authresult); - console.info('testFace FACE_Auth_MTBF_0101 auth '+output + '=' + data.authresult); - if(i == 9){ - finishicon = 1 - } - }, - function(data){ - }) - })(i) - } - publicFC.publicauth(UserAuth, challenge,AuthType.FACE,AuthTurstLevel.ATL1, - async function (data) { - console.info('testFace FACE_Auth_MTBF_0101 auth11 =' + data.authresult); - if(data.authresult == ResultCode.SUCCESS){ - } - while(finishicon = 0){ - await sleep(100); - } - fcycle(data.authresult) - }, - function(data){ - }) -} - -function authUsercycle(challenge,fcycle){ - let finishicon = 0 - for(let i = 0; i < 10; i++){ - //未到达10个认证时,完成认证 - //闭包方法 - (function c(output){ - publicFC.publicauthUser(UserAuth ,userID.User1,challenge,AuthType.FACE,AuthTurstLevel.ATL1, - function (data) { - expect(true).assertEqual(data.authresult); - console.info('testFace FACE_Auth_MTBF_0102 auth '+output + '=' + data.authresult); - if(i == 9){ - finishicon = 1 - } - }, - function(data){ - }) - })(i) - } - publicFC.publicauthUser(UserAuth, userID.User1,challenge,AuthType.FACEs,AuthTurstLevel.ATL1, - async function (data) { - console.info('testFace FACE_Auth_MTBF_0102 auth11 =' + data.authresult); - if(data.authresult == ResultCode.SUCCESS){ - } - while(finishicon = 0){ - await sleep(100); - } - fcycle(data.authresult) - }, - function(data){ - }) -} - -describe('userauthTest', function () { - - it('Security_IAM_FACE_Auth_MTBF_0101', 4, async function (done) { - try { - publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata); - let challenge ; - publicFC.publicOpenSession(UserIDM, function (data) { - console.info('testFace FACE_Auth_MTBF_0101 OpenSession challenge = ' + data); - challenge = data; - publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, function (data) { - console.info('testFace FACE_Auth_MTBF_0101 addCredential onResult = ' + JSON.stringify(data)); - publicFC.publicauth(UserAuth,challenge,AuthType.PIN,AuthTurstLevel.ATL1, function (data) { - console.info('FACE_Auth_MTBF_0101 auth onResult = ' + JSON.stringify(data)); - let info101 = data; - let token = info101.authextr.token; - CredentialInfoface2d.token = token; - publicFC.publicaddCredential(UserIDM,CredentialInfoface2d, function (onresult) { - console.info('testface FACE_Auth_MTBF_0101 addCredential=' + JSON.stringify(onresult)); - authcycle(challenge,function(data){ - publicFC.publicdelUser(UserIDM,token, function (data) { - console.info('testFace FACE_Auth_MTBF_0101 delUser = ' + JSON.stringify(data)); - publicFC.publicCloseSession(UserIDM, function (data) { - console.info('testFace FACE_Auth_MTBF_0101 publicCloseSession'); - publicFC.publicunRegisterInputer(PinAuth, function (data) { - console.info('testFace FACE_Auth_MTBF_0101 publicunRegisterInputer'); - done(); - }) - }) - }, function (data) { - }) - }) - }, function (data) { - }) - }, function (data) { - }) - }, function (data) { - }) - }) - } catch (e) { - console.log("FACE_Auth_MTBF_0101 fail " + e); - expect(null).assertFail(); - } - }) - - it('Security_IAM_FACE_Auth_MTBF_0102', 4, async function (done) { - try { - publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata); - let challenge ; - publicFC.publicOpenSession(UserIDM, function (data) { - console.info('testFace FACE_Auth_MTBF_0102 OpenSession challenge = ' + data); - challenge = data; - publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, function (data) { - console.info('testFace FACE_Auth_MTBF_0102 addCredential onResult = ' + JSON.stringify(data)); - publicFC.publicauth(UserAuth,challenge,AuthType.PIN,AuthTurstLevel.ATL1, function (data) { - console.info('testface FACE_Auth_MTBF_0102 auth onResult = ' + JSON.stringify(data)); - let info101 = data; - let token = info101.authextr.token; - CredentialInfoface2d.token = token; - publicFC.publicaddCredential(UserIDM,CredentialInfoface2d, function (onresult) { - console.info('FACE_Auth_MTBF_0102 addCredential Result2=' + JSON.stringify(onresult)); - authUsercycle(challenge,function(data){ - publicFC.publicdelUser(UserIDM,token, function (data) { - console.info('testFace FACE_Auth_MTBF_0102 delUser = ' + JSON.stringify(data)); - publicFC.publicCloseSession(UserIDM, function (data) { - console.info('testFace FACE_Auth_MTBF_0102 publicCloseSession'); - publicFC.publicunRegisterInputer(PinAuth, function (data) { - console.info('testFace FACE_Auth_MTBF_0102 publicunRegisterInputer'); - done(); - }) - }) - }, function (data) { - }) - }) - }, function (data) { - }) - }, function (data) { - }) - }, function (data) { - }) - }) - } catch (e) { - console.log("FACE_Auth_MTBF_0102 fail " + e); - expect(null).assertFail(); - } - }) -}) diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_DFX_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_DFX_CallbackJsunit.test.js new file mode 100644 index 000000000..d56d9e631 --- /dev/null +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_DFX_CallbackJsunit.test.js @@ -0,0 +1,637 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +import {describe, it, expect} from 'deccjsunit/index' +import userAuth from '@ohos.userAuth' +import userIDM from '@ohos.userIDM' +import pinAuth from '@ohos.pinAuth' +import * as publicFC from './Publicfunction-n' + +let UserIDM = userIDM.constructor() +let PinAuth = pinAuth.constructor() +let UserAuth = userAuth.constructor() + +let AuthType = { + PIN: 1, + FACE: 2 +} +let AuthSubType = { + PIN_SIX: 10000, + PIN_NUMBER: 10001, + PIN_MIXED: 10002, + FACE_2D: 20000, + FACE_3D: 20001 +} + +let AuthTurstLevel = { + ATL1: 10000, + ATL2: 20000, + ATL3: 30000, + ATL4: 40000 +} + +let SetPropertyType = { + PROCESS_ALGORITHM: 1, +} + +let userID = { + User1: 100, + User2: 2, + User3: 3, + User4: 4, + User5: 5 +} + +let ResultCode = { + SUCCESS: 0, + FAIL: 1, + GENERAL_ERROR: 2, + CANCELED: 3, + TIMEOUT: 4, + TYPE_NOT_SUPPORT: 5, + TRUST_LEVEL_NOT_SUPPORT: 6, + BUSY: 7, + INVALID_PARAMETERS: 8, + LOCKED: 9, + NOT_ENROLLED: 10, + Authfail: 14 +} + +let GetPropertyType = { + AUTH_SUB_TYPE: 1, + REMAIN_TIMES: 2, + FREEZING_TIME: 3 +} + +let Inputerdata = new Uint8Array([1, 2, 3, 4, 5, 6]); +let Inputerdatan = new Uint8Array([1, 1, 1, 1, 1, 1]); +let Inputerdatanum = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]); +let Inputerdatanumn = new Uint8Array([1, 1, 1, 1, 1, 1, 1, 1]); +let Inputerdatamix = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9]); +let Inputerdatamixn = new Uint8Array([1, 1, 1, 1, 1, 1, 1, 1, 1]); + +let GetPropertyTypearray = new Array(); +GetPropertyTypearray[0] = GetPropertyType.AUTH_SUB_TYPE; +GetPropertyTypearray[1] = GetPropertyType.FREEZING_TIME; +GetPropertyTypearray[2] = GetPropertyType.REMAIN_TIMES; + +let GetPropertyRequestpin = { + authType: AuthType.PIN, + keys: GetPropertyTypearray +} + +let GetPropertyRequestface = { + authType: AuthType.FACE, + keys: GetPropertyTypearray +} + +let CredentialInfopinsix = { + credType: AuthType.PIN, + credSubType: AuthSubType.PIN_SIX, + token: null +} + +let CredentialInfopinnum = { + credType: AuthType.PIN, + credSubType: AuthSubType.PIN_NUMBER, + token: null +} + +let CredentialInfopinmix = { + credType: AuthType.PIN, + credSubType: AuthSubType.PIN_MIXED, + token: null +} + +let CredentialInfoface2d = { + credType: AuthType.FACE, + credSubType: AuthSubType.FACE_2D, + token: null +} + +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +function inputererror(inputer,done){ + try { + let registerresult = publicFC.publicRegisterInputer(PinAuth, inputer, inputer) + expect(true).assertEqual(registerresult); + publicFC.publicunRegisterInputer(PinAuth, function (data) { + console.info("testFace inputererror publicunRegisterInputer unRegist = " + data) + }) + done(); + } catch (e) { + console.log("testFace inputererror fail " + e); + expect(null).assertFail(); + } +} + +function addCredentialerr(inputer,done){ + console.info('testFace addCredentialerr start'); + try { + let challenge; + publicFC.publicRegisterInputer(PinAuth, AuthSubType.PIN_SIX, Inputerdata); + publicFC.publicOpenSession(UserIDM, function (data) { + console.info('testFace addCredentialerr publicOpenSession data = ' + data); + challenge = data; + publicFC.publicaddCredential(UserIDM, inputer, function (data) { + console.info('testFace addCredentialerr callback data = ' + JSON.stringify(data)); + let addcredresult101 = data.addCredresult; + console.info("testFace addCredentialerr addcredresult101 = " + addcredresult101); + expect(ResultCode.FAIL).assertEqual(addcredresult101); + publicFC.publicCloseSession(UserIDM, function (data) { + console.info("testFace addCredentialerr publicCloseSession = " + data); + publicFC.publicunRegisterInputer(PinAuth, function (data) { + console.info("testFace addCredentialerr unRegister = " + data); + done(); + }) + }) + }, function (data) { + }) + }) + } catch (e) { + console.log("addCredentialerr fail " + e); + expect(null).assertFail(); + } +} + +function autherror(inputer,done){ + console.info('testFace autherror start'); + try { + let challenge; + publicFC.publicRegisterInputer(PinAuth, AuthSubType.PIN_NUMBER, Inputerdatanum); + publicFC.publicOpenSession(UserIDM, function (data) { + console.info('testFace autherror publicOpenSession data = ' + data); + challenge = data; + publicFC.publicaddCredential(UserIDM, CredentialInfopinnum, function (data) { + console.info('testFace autherror callback data = ' + JSON.stringify(data)); + let token; + publicFC.publicauth(UserAuth, challenge, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { + console.info('testFace autherror publicauth'); + token = data.authextr.token; + expect(ResultCode.SUCCESS).assertEqual(data.authresult); + console.info("testFace autherror token = " + token); + publicFC.publicauth(UserAuth, challenge, inputer, inputer, function (data) { + expect(ResultCode.TRUST_LEVEL_NOT_SUPPORT).assertEqual(data.authresult); + publicFC.publicdelUser(UserIDM, token, function (data) { + console.info("testFace autherror publicdelUser"); + let deluserresult = data.delUserresult; + console.info("testFace autherror deluserresult = " + deluserresult); + expect(ResultCode.SUCCESS).assertEqual(deluserresult); + publicFC.publicCloseSession(UserIDM, function (data) { + console.info("testFace autherror publicCloseSession = " + data); + publicFC.publicunRegisterInputer(PinAuth, function (data) { + console.info("testFace autherror unRegister = " + data); + done(); + }) + }) + }, function (data) { + }) + }, function (data) { + }) + }, function (data) { + }) + }, function (data) { + }) + }) + } catch (e) { + console.log("autherror fail " + e); + expect(null).assertFail(); + } +} + +function authusererror(inputer,done){ + console.info('testFace authusererror start'); + try { + let challenge; + publicFC.publicRegisterInputer(PinAuth, AuthSubType.PIN_NUMBER, Inputerdatanum); + publicFC.publicOpenSession(UserIDM, function (data) { + console.info('testFace authusererror publicOpenSession data = ' + data); + challenge = data; + publicFC.publicaddCredential(UserIDM, CredentialInfopinnum, function (data) { + console.info('testFace authusererror callback data = ' + JSON.stringify(data)); + let addcredresult101 = data.addCredresult; + console.info("testFace authusererror addcredresult101 = " + addcredresult101); + let token; + console.info('testFace authusererror addSuccess'); + publicFC.publicauthUser(UserAuth, userID.User1, challenge, inputer, inputer, function (data) { + let auth101 = data.authresult + console.info("testFace authusererror auth101 = " + auth101); + if(auth101==ResultCode.FAIL || auth101==ResultCode.TRUST_LEVEL_NOT_SUPPORT){ + console.log("authusererror pass result code = " + auth101); + }else{ + console.log("authusererror fail result code = " + auth101); + expect(null).assertFail(); + } + publicFC.publicauth(UserAuth,challenge,AuthType.PIN,AuthTurstLevel.ATL1,function (data) { + console.info('testFace authusererror publicauth'); + token = data.authextr.token; + console.info("testFace authusererror token = " + token); + publicFC.publicdelUser(UserIDM, token, function (data) { + console.info("testFace authusererror publicdelUser"); + let deluserresult = data.delUserresult; + console.info("testFace authusererror deluserresult = " + deluserresult); + publicFC.publicCloseSession(UserIDM, function (data) { + console.info("testFace authusererror publicCloseSession = " + data); + publicFC.publicunRegisterInputer(PinAuth, function (data) { + console.info("testFace authusererror unRegister= " + data); + done(); + }) + }) + }, function (data) { + }) + }, function (data) { + }) + }, function (data) { + }) + }, function (data) { + }) + }) + } catch (e) { + console.log("authusererror fail " + e); + expect(null).assertFail(); + } +} + +function delusererror(inputer,done){ + console.info('testFace delusererror start'); + try { + let challenge; + publicFC.publicRegisterInputer(PinAuth, AuthSubType.PIN_NUMBER, Inputerdatanum); + publicFC.publicOpenSession(UserIDM, function (data) { + console.info('testFace delusererror publicOpenSession data = ' + data); + challenge = data; + publicFC.publicaddCredential(UserIDM, CredentialInfopinnum, function (data) { + console.info('testFace delusererror callback data = ' + JSON.stringify(data)); + let addcredresult101 = data.addCredresult; + console.info("testFace delusererror addcredresult101 = " + addcredresult101); + let token; + console.info('testFace delusererror addSuccess'); + publicFC.publicauth(UserAuth, challenge, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { + console.info('testFace delusererror publicauth'); + token = data.authextr.token; + console.info("testFace delusererror token = " + token); + publicFC.publicdelUser(UserIDM, inputer, function (data) { + console.info("testFace delusererror delUserresult1 = " + data.delUserresult); + publicFC.publicdelUser(UserIDM, token, function (data) { + console.info("testFace delusererror publicdelUser"); + let deluserresult = data.delUserresult; + console.info("testFace delusererror deluserresult2 = " + deluserresult); + publicFC.publicCloseSession(UserIDM, function (data) { + console.info("testFace delusererror publicCloseSession = " + data); + publicFC.publicunRegisterInputer(PinAuth, function (data) { + console.info("testFace delusererror unRegister = " + data); + done(); + }) + }) + }, function (data) { + }) + }, function (data) { + }) + }, function (data) { + }) + }, function (data) { + }) + }) + } catch (e) { + console.log("delusererror fail " + e); + expect(null).assertFail(); + } +} + +function updateerror(inputer,done){ + console.info('testFace updateerror start'); + try { + publicFC.publicRegisterInputer(PinAuth, AuthSubType.PIN_SIX, Inputerdata) + publicFC.publicOpenSession(UserIDM, function (data) { + let challenge = data; + console.info("updateerror challenge = " + challenge); + publicFC.publicaddCredential(UserIDM, CredentialInfopinsix, function (data) { + let addcredresult101 = data.addcredresult; + console.info("updateerror addcredresult101 = " + addcredresult101); + publicFC.publicauth(UserAuth, challenge, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { + let auth101 = data + console.info("updateerror auth101 = " + auth101); + let token = auth101.authextr.token; + CredentialInfopinnum.token = null; + CredentialInfopinnum.credType = null; + CredentialInfopinnum.credSubType = null; + console.info("updateerror token = " + token); + publicFC.publicupdateCred(UserIDM, CredentialInfopinnum, function (data) { + let updateresult = data.updateCredresult; + console.info("updateerror updateresult = " + updateresult); + expect(ResultCode.FAIL).assertEqual(updateresult); + publicFC.publicauth(UserAuth, challenge, AuthType.PIN, AuthTurstLevel.ATL1, + function (data) { + auth101 = data + console.info("updateerror auth101 = " + auth101); + let token1 = auth101.authextr.token + console.info("updateerror token1 = " + token1); + publicFC.publicdelUser(UserIDM, token1, function (data) { + console.info("updateerror delUser result = " + data.delUserresult); + publicFC.publicCloseSession(UserIDM, function (data) { + console.info("updateerror closesession = " + data); + publicFC.publicunRegisterInputer(PinAuth, function (data) { + console.info("updateerror unRegist = " + data); + done(); + }) + }) + }, function (data) { + }) + }, function (data) { + }) + }, function (data) { + }) + }, function (data) { + }) + }, function (data) { + }) + }) + } catch (e) { + console.log("updateerror fail " + e); + expect(null).assertFail(); + } +} + +function delcrederror(inputer,done){ + try { + publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata) + let challenge ; + publicFC.publicOpenSession(UserIDM, function (data) { + console.info('delcrederror openSession challenge = ' + data); + challenge = data; + publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, function (onresult) { + console.info('delcrederror addCredential Result1 = ' + JSON.stringify(onresult)); + let info101; + publicFC.publicauth(UserAuth,challenge,AuthType.PIN,AuthTurstLevel.ATL1, function (data) { + console.info('delcrederror auth onResult = ' + JSON.stringify(data)); + info101 = data; + let token = info101.authextr.token; + CredentialInfoface2d.token = token; + let addfaceresult; + publicFC.publicaddCredential(UserIDM,CredentialInfoface2d, function (onresult) { + console.info('delcrederror addCredential Result2=' + JSON.stringify(onresult)); + addfaceresult = onresult; + let delcredresult ; + publicFC.publicdelCred(UserIDM, inputer, inputer, function (data) { + console.info('testFace delcrederror del=' + JSON.stringify(data)); + delcredresult = data; + expect(ResultCode.Authfail).assertEqual(delcredresult.delCredresult); + publicFC.publicdelUser(UserIDM,token, function (data) { + console.info('delcrederror delUser= ' + JSON.stringify(data)); + publicFC.publicCloseSession(UserIDM, function (data) { + console.info('delcrederror closeSession'); + publicFC.publicunRegisterInputer(PinAuth, function (data) { + console.info('delcrederror unRegister'); + done(); + }) + }) + }, function (data) { + }) + }, function (onacquireinfo) { + }) + }, function (onacquireinfo) { + }) + }, function (data) { + }) + }, function (onacquireinfo) { + }) + }) + } catch (e) { + console.log("delcrederror fail " + e); + expect(null).assertFail(); + } +} + +function getauthinfoerror(inputer,done){ + try { + publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata) + publicFC.publicOpenSession(UserIDM,function(data){ + let challenge = data + publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, + function(onresult) { + console.info('testFace getauthinfoerror addCredresult = ' + onresult.addCredresult); + publicFC.publicauth(UserAuth,challenge,AuthType.PIN,AuthTurstLevel.ATL1, + function(onresult) { + console.info( + 'testFace getauthinfoerror addCred onResult = ' + JSON.stringify(onresult)); + let token = onresult.authextr.token + CredentialInfoface2d.token = token + publicFC.publicaddCredential(UserIDM,CredentialInfoface2d,function(onresult) { + console.log("testFace getauthinfoerror addface= " + onresult.addCredresult) + publicFC.publicgetAuthInfo(UserIDM,inputer,function(AsyncCallback) { + console.log("testFace getauthinfoerror getAuthInfo= " + + JSON.stringify(AsyncCallback)) + publicFC.publicdelUser(UserIDM,token,function(onresult){ + let delresult = onresult.delUserresult; + console.log("testFace getauthinfoerror delUser= " + delresult) + publicFC.publicCloseSession(UserIDM,function(data){ + console.log("getauthinfoerror CloseSession= " + data) + publicFC.publicunRegisterInputer(PinAuth,function(data){ + done(); + }) + }) + },function(onacquireinfo){ + }) + }) + }, function(onAcquireInfo) { + }) + }, function(onAcquireInfo) { + }); + }, function(onAcquireInfo) { + }); + }) + } catch (e) { + console.log("getauthinfoerror fail " + e); + expect(null).assertFail(); + } +} + +function getAvailabeStatuserror(inputer,done){ + try { + publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata) + publicFC.publicOpenSession(UserIDM,function(data){ + let challenge = data + publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, + function(onresult) { + console.info('testFace getAvailabeStatuserror addCredresult = ' + onresult.addCredresult); + console.log("testFace faceDemo getAvailabeStatuserror authUser = " + onresult.addCredresult); + publicFC.publicauth(UserAuth,challenge,AuthType.PIN,AuthTurstLevel.ATL1, + function(onresult) { + console.info('testFace getAvailabeStatuserror addCred = ' + JSON.stringify(onresult)); + let token = onresult.authextr.token + CredentialInfoface2d.token = token + publicFC.publicaddCredential(UserIDM,CredentialInfoface2d,function(onresult) { + console.info('testFace getAvailabeStatuserror addface=' + onresult.authresult); + console.log("testFace getAvailabeStatuserror addface result="+ onresult.addCredresult) + let AvailabeStatus = publicFC.publicgetAvailabeStatus( + UserAuth,inputer,inputer) + console.info('testFace getAvailabeStatuserror addCAvailabeStatusred = ' + + JSON.stringify(AvailabeStatus)); + expect(ResultCode.INVALID_PARAMETERS).assertEqual(AvailabeStatus); + publicFC.publicdelUser(UserIDM,token,function(onresult){ + console.log("testFace getAvailabeStatuserror delUser="+ onresult.delUserresult) + publicFC.publicCloseSession(UserIDM,function(data){ + console.log("testFace getAvailabeStatuserror CloseSession = " + data) + publicFC.publicunRegisterInputer(PinAuth, function(data){ + done(); + }) + }) + },function(onacquireinfo){ + }) + }, function(onAcquireInfo) { + }) + }, function(onAcquireInfo) { + } + ); + }, function(onAcquireInfo) { + }); + }) + } catch (e) { + console.log("getAvailabeStatuserror fail " + e); + expect(null).assertFail(); + } +} + +function getPropertyerror(inputer,done){ + try { + publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata) + publicFC.publicOpenSession(UserIDM,function(data){ + let challenge = data + publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, function(onresult) { + console.info('testFace Coauth_Func_0110 addCredresult = ' + onresult.addCredresult); + publicFC.publicauth(UserAuth,challenge,AuthType.PIN,AuthTurstLevel.ATL1, function(onresult) { + console.info('testFace Coauth_Func_0110 addCred onResult = ' + JSON.stringify(onresult)); + let token = onresult.authextr.token + CredentialInfoface2d.token = token + publicFC.publicaddCredential(UserIDM,CredentialInfoface2d,function(onresult) { + console.log("testFace Coauth_Func_0110 ddCredentialface = " + onresult.addCredresult) + GetPropertyRequestface.authType = inputer; + GetPropertyRequestface.keys = inputer; + publicFC.publicgetProperty(UserAuth,GetPropertyRequestface,function(onresult) { + console.log("testFace Coauth_Func_0110 GetPropertyface = " + JSON.stringify(onresult)) + expect(ResultCode.FAIL).assertEqual(onresult.result); + publicFC.publicdelUser(UserIDM,token,function(onresult){ + console.log("testFace Coauth_Func_0110 delUser= " + onresult.delUserresult) + publicFC.publicCloseSession(UserIDM,function(data){ + console.log("testFace Coauth_Func_0110 CloseSession callback = " + data) + publicFC.publicunRegisterInputer(PinAuth, function(data){ + done(); + }) + }) + },function(onacquireinfo){ + }) + }) + }, function(onAcquireInfo) { + }) + }, function(onAcquireInfo) { + }) + }, function(onAcquireInfo) { + }) + }) + } catch (e) { + console.log("Security_IAM_Coauth_Func_0110 fail " + e); + expect(null).assertFail(); + } +} + + + +describe('userauthTest', function () { + + it('Security_IAM_PIN_Interface_DFX_0101', 0, async function (done) { + inputererror(null,done); + }) + + it('Security_IAM_PIN_Interface_DFX_0102', 1, async function (done) { + inputererror('Errortest',done); + }) + + it('Security_IAM_PIN_Interface_DFX_0103', 1, async function (done) { + addCredentialerr(null,done); + }) + + it('Security_IAM_PIN_Interface_DFX_0104', 1, async function (done) { + addCredentialerr('Errortest',done); + }) + + it('Security_IAM_PIN_Interface_DFX_0105', 1, async function (done) { + autherror(null,done); + }) + + it('Security_IAM_PIN_Interface_DFX_0106', 0, async function (done) { + autherror('Errortest',done); + }) + + it('Security_IAM_PIN_Interface_DFX_0107', 0, async function (done) { + authusererror(null,done); + }) + + it('Security_IAM_PIN_Interface_DFX_0108', 0, async function (done) { + authusererror('Errortest',done); + }) + + it('Security_IAM_PIN_Interface_DFX_0109', 0, async function (done) { + getPropertyerror(null,done); + }) + + it('Security_IAM_PIN_Interface_DFX_0110', 0, async function (done) { + getPropertyerror('Errortest',done); + }) + + it('Security_IAM_PIN_Interface_DFX_0111', 0, async function (done) { + updateerror(null,done); + }) + + it('Security_IAM_PIN_Interface_DFX_0112', 0, async function (done) { + updateerror('Errortest',done); + }) + + it('Security_IAM_PIN_Interface_DFX_0113', 0, async function (done) { + delusererror(null,done); + }) + + it('Security_IAM_PIN_Interface_DFX_0114', 0, async function (done) { + delusererror('Errortest',done); + }) + + it('Security_IAM_PIN_Interface_DFX_0115', 0, async function (done) { + delcrederror(null,done); + }) + + it('Security_IAM_PIN_Interface_DFX_0116', 0, async function (done) { + delcrederror('Errortest',done); + }) + + it('Security_IAM_PIN_Interface_DFX_0117', 0, async function (done) { + getauthinfoerror(null,done); + }) + + it('Security_IAM_PIN_Interface_DFX_0118', 0, async function (done) { + getauthinfoerror('Errortest',done); + }) + + it('Security_IAM_PIN_Interface_DFX_0119', 0, async function (done) { + getAvailabeStatuserror(null,done); + }) + + it('Security_IAM_PIN_Interface_DFX_0120', 0, async function (done) { + getAvailabeStatuserror('Errortest',done); + }) + +}) + diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_Func_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_Func_CallbackJsunit.test.js index 216a0fc56..a55d49d29 100644 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_Func_CallbackJsunit.test.js +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_Func_CallbackJsunit.test.js @@ -14,9 +14,9 @@ */ import {describe, it, expect} from 'deccjsunit/index' -import userAuth from '@ohos.userauth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' +import userAuth from '@ohos.userAuth' +import userIDM from '@ohos.userIDM' +import pinAuth from '@ohos.pinAuth' import * as publicFC from './Publicfunction-n.js' @@ -33,7 +33,7 @@ describe('userauthTest', function () { done(); }) - it('Security_IAM_Face_Interface_check_IDMAuthSubType_0101', 0, async function (done) { + it('Security_IAM_Face_Interface_check_IDMAuthType_0101', 0, async function (done) { console.info('testFace Security_IAM_Face_Interface_check_IDMAuthSubType_0101 start'); expect(1).assertEqual(userIDM.AuthType.PIN); expect(2).assertEqual(userIDM.AuthType.FACE); diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_MTBF_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_MTBF_CallbackJsunit.test.js deleted file mode 100644 index e9969e4d9..000000000 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_Interface_MTBF_CallbackJsunit.test.js +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {describe, it, expect} from 'deccjsunit/index' -import userAuth from '@ohos.userauth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' -import * as publicFC from './Publicfunction-n' - - -let UserIDM = userIDM.constructor() -let PinAuth = pinAuth.constructor() -let UserAuth = userAuth.constructor() - -let AuthType = { - PIN : 1, - FACE : 2 -} - -let userID = { - User1 : 100, - User2 : 2, - User3 : 3, - User4 : 4, - User5 : 5 -} - -let AuthSubType = { - PIN_SIX : 10000, - PIN_NUMBER : 10001, - PIN_MIXED : 10002, - FACE_2D : 20000, - FACE_3D : 20001 -} - -let AuthTurstLevel = { - ATL1 : 10000, - ATL2 : 20000, - ATL3 : 30000, - ATL4 : 40000 -} - -let SetPropertyType1 = { - PROCESS_ALGORITHM : 1, -} - -let SetPropertyType0 = { - PROCESS_ALGORITHM : 0, -} - -let ResultCode = { - SUCCESS : 0, - FAIL : 1, - GENERAL_ERROR : 2, - CANCELED : 3, - TIMEOUT : 4, - TYPE_NOT_SUPPORT : 5, - TRUST_LEVEL_NOT_SUPPORT : 6, - BUSY : 7, - INVALID_PARAMETERS : 8, - LOCKED : 9, - NOT_ENROLLED : 10 -} - -let GetPropertyType = { - AUTH_SUB_TYPE : 1, - REMAIN_TIMES : 2, - FREEZING_TIME : 3 -} - -let Inputerdata = new Uint8Array([1, 2, 3, 4, 5, 6]); - -let GetPropertyTypearray=new Array(); -GetPropertyTypearray[0]=GetPropertyType.AUTH_SUB_TYPE; -GetPropertyTypearray[1]=GetPropertyType.FREEZING_TIME; -GetPropertyTypearray[2]=GetPropertyType.REMAIN_TIMES; - -let GetPropertyRequestpin = { - authType:AuthType.PIN, - keys:GetPropertyTypearray - } - -let GetPropertyRequestface = { - authType:AuthType.FACE, - keys:GetPropertyTypearray - } - -let CredentialInfopinsix = { - credType: AuthType.PIN, - credSubType: AuthSubType.PIN_SIX, - token: null -} - -let CredentialInfoface2d = { - credType: AuthType.FACE, - credSubType: AuthSubType.FACE_2D, - token: null -} - - - -describe('userauthTest', function () { - - /* - * @tc.number : testGetEntriesString101 - * @tc.name : Use getEntries get the value by mixing the string key - * @tc.desc : Mixed strings value can be obtained correctly - * @tc.size : MediumTest - * @tc.type : Function - * @tc.level : Level 1 - */ - it('Security_IAM_Interface_MTBF_0101', 4, async function (done) { - try { - let verisioninfo = UserAuth.getVersion(); - console.log("Security_IAM_Interface_MTBF_0101 Version is: " + verisioninfo); - publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata); - let challenge ; - publicFC.publicOpenSession(UserIDM, function (data) { - console.info('testFace Security_IAM_Interface_MTBF_0101 publicOpenSession challenge = ' + data); - challenge = data; - publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, function (data) { - console.info('testFace Interface_MTBF_0101 publicaddCredential= ' + JSON.stringify(data)); - let info101; - publicFC.publicauth(UserAuth,challenge,AuthType.PIN,AuthTurstLevel.ATL1, function (data) { - console.info('testFace Interface_MTBF_0101 publicauth = ' + JSON.stringify(data)); - info101 = data; - let token = info101.authextr.token; - CredentialInfoface2d.token = token; - let faceinfo101 ; - publicFC.publicauthUser(UserAuth,userID.User1,challenge,AuthType.PIN,AuthTurstLevel.ATL1, - function (data) { - console.info('testFace Interface_MTBF_0101 publicauthUser = ' + JSON.stringify(data)); - faceinfo101 = data; - expect(ResultCode.SUCCESS).assertEqual(faceinfo101.authresult); -// publicFC.publicaddCredential(UserIDM,CredentialInfoface2d, function (data) { -// console.info('testFace Interface_MTBF_0101 addCredential = ' + JSON.stringify(data)); - let EnrolledCredInfo ; - publicFC.publicgetAuthInfo(UserIDM, AuthType.PIN, function (data) { - console.info('testFace Interface_MTBF_0101 getAuthInfo' + JSON.stringify(data)); - EnrolledCredInfo = data; - expect(AuthSubType.PIN_SIX).assertEqual(EnrolledCredInfo[0].authSubType); - let ExecutorProperty101; - publicFC.publicgetProperty(UserAuth,GetPropertyRequestpin, function (data) { - console.info('testFace Interface getProperty data' + JSON.stringify(data)); - ExecutorProperty101 = data; - expect(ResultCode.SUCCESS).assertEqual(ExecutorProperty101.result); -// expect(AuthSubType.PIN_SIX).assertEqual(ExecutorProperty101.authSubType); -// publicFC.publicsetProperty(UserAuth,SetPropertyType1, function (data) { -// console.info('testFace Interface setProperty'+ JSON.stringify(data)); -// publicFC.publicsetProperty(UserAuth,SetPropertyType0, function (data) { -// console.info('testFace setProperty data' + JSON.stringify(data)); -// let AvailabeStatus = publicFC.publicgetAvailabeStatus( -// UserAuth,AuthType.FACE,AuthTurstLevel.ATL1) -// expect(ResultCode.SUCCESS).assertEqual(AvailabeStatus); - publicFC.publicdelUser(UserIDM,token, function (data) { - console.info('testFace Interface delUser='+ JSON.stringify(data)); - publicFC.publicCloseSession(UserIDM, function (data) { - console.info('testFace Interface_MTBF_0101 CloseSession '); - publicFC.publicunRegisterInputer(PinAuth, function (data) { - console.info('testFace Interface_MTBF unRegisterInputer'); - done(); - }) - }) - }, function (data) { - }) -// }) -// }) - }) - }) -// }, function (data) { -// }) - }, function (data) { - }) - }, function (data) { - }) - }, function (data) { - }) - }) - } catch (e) { - console.log("Security_IAM_Interface_MTBF_0101 fail " + e); - expect(null).assertFail(); - } - }) -}) diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_DFX_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_DFX_CallbackJsunit.test.js index 6c3e9373b..056cf9df0 100644 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_DFX_CallbackJsunit.test.js +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_DFX_CallbackJsunit.test.js @@ -14,9 +14,9 @@ */ import {describe, it, expect} from 'deccjsunit/index' -import userAuth from '@ohos.userauth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' +import userAuth from '@ohos.userAuth' +import userIDM from '@ohos.userIDM' +import pinAuth from '@ohos.pinAuth' import * as publicFC from './Publicfunction-n' let UserIDM = userIDM.constructor() diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Func_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Func_CallbackJsunit.test.js index d0ca5f7b4..0973acdfb 100644 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Func_CallbackJsunit.test.js +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Func_CallbackJsunit.test.js @@ -15,14 +15,14 @@ import {describe, it, expect} from 'deccjsunit/index' -import userAuth from '@ohos.userauth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' +import userAuth from '@ohos.userAuth' +import userIDM from '@ohos.userIDM' +import pinAuth from '@ohos.pinAuth' import * as publicFC from './Publicfunction-n' -let UserIDM = userIDM.constructor() -let PinAuth = pinAuth.constructor() -let UserAuth = userAuth.constructor() +let UserIDM = new userIDM.UserIdentityManager(); +let PinAuth = new pinAuth.PINAuth(); +let UserAuth = new userAuth.UserAuth(); let AuthType = { PIN: 1, @@ -307,7 +307,7 @@ describe('userauthTest', function () { let challenge; let cancelresult; let token; - cancelresult = publicFC.publiccancel(UserIDM, challenge); + // cancelresult = publicFC.publiccancel(UserIDM, challenge); console.info("testFace Security_IAM_PIN_AddCred_Func_0105 cancelresult" + cancelresult); publicFC.publicOpenSession(UserIDM, function (data) { challenge = data; @@ -315,6 +315,7 @@ describe('userauthTest', function () { let result1 = null; publicFC.publicaddCredential(UserIDM, CredentialInfopinmix, async function (data) { result1 = data.addCredresult; + cancelresult = publicFC.publiccancel(UserIDM, challenge); console.info("testFace Security_IAM_PIN_AddCred_Func_0105 result1" + result1); if(cancelresult == 0){ expect(ResultCode.CANCELED).assertEqual(result1); @@ -454,7 +455,7 @@ describe('userauthTest', function () { await publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { let authresult = data.authresult - expect(ResultCode.Authfail).assertEqual(authresult); + expect(ResultCode.FAIL).assertEqual(authresult); publicFC.publicdelUser(UserIDM, token, function (data) { let delresult = data.delUserresult console.info("Security_IAM_PIN_Auth_Func_0101 delresult = " + delresult); @@ -503,7 +504,7 @@ describe('userauthTest', function () { await publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { let authresult = data.authresult - expect(ResultCode.Authfail).assertEqual(authresult); + expect(ResultCode.FAIL).assertEqual(authresult); let deluserresult = publicFC.publicdelUser(UserIDM, token, function (data) { let delresult = data.delUserresult console.info("Security_IAM_PIN_Auth_Func_0102 delresult = " + delresult); @@ -552,7 +553,7 @@ describe('userauthTest', function () { await publicFC.publicauth(UserAuth, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { let authresult = data.authresult - expect(ResultCode.Authfail).assertEqual(authresult); + expect(ResultCode.FAIL).assertEqual(authresult); let deluserresult = publicFC.publicdelUser(UserIDM, token, function (data) { let delresult = data.delUserresult console.info("Security_IAM_PIN_Auth_Func_0103 delresult = " + delresult); @@ -602,7 +603,7 @@ describe('userauthTest', function () { await publicFC.publicauthUser( UserAuth, userID.User1, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { let authresult = data.authresult - expect(ResultCode.Authfail).assertEqual(authresult); + expect(ResultCode.FAIL).assertEqual(authresult); let deluserresult = publicFC.publicdelUser(UserIDM, token, function (data) { let delresult = data.delUserresult console.info("Security_IAM_PIN_Auth_Func_0104 delresult = " + delresult); @@ -652,7 +653,7 @@ describe('userauthTest', function () { await publicFC.publicauthUser( UserAuth, userID.User1, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { let authresult = data.authresult - expect(ResultCode.Authfail).assertEqual(authresult); + expect(ResultCode.FAIL).assertEqual(authresult); let deluserresult = publicFC.publicdelUser(UserIDM, token, function (data) { let delresult = data.delUserresult console.info("Security_IAM_PIN_Auth_Func_0105 delresult = " + delresult); @@ -702,7 +703,7 @@ describe('userauthTest', function () { await publicFC.publicauthUser( UserAuth, userID.User1, challenge1, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { let authresult = data.authresult - expect(ResultCode.Authfail).assertEqual(authresult); + expect(ResultCode.FAIL).assertEqual(authresult); let deluserresult = publicFC.publicdelUser(UserIDM, token, function (data) { let delresult = data.delUserresult console.info("Security_IAM_PIN_Auth_Func_0106 delresult = " + delresult); @@ -1057,9 +1058,9 @@ describe('userauthTest', function () { await setTimeout( publicFC.publicRegisterInputer(PinAuth, AuthSubType.PIN_MIXED, Inputerdatamix), 500) console.info("Security_IAM_PIN_Update_Func_0102 challenge = " + challenge); - CredentialInfopinnum.token = token - console.info("PIN_Update_Func_0102 Infopinnum.token = " + CredentialInfopinnum.token); - await publicFC.publicupdateCred(UserIDM, CredentialInfopinnum, function (data) { + CredentialInfopinmix.token = token + console.info("PIN_Update_Func_0102 Infopinnum.token = " + CredentialInfopinmix.token); + await publicFC.publicupdateCred(UserIDM, CredentialInfopinmix, function (data) { let updateresult = data.updateCredresult; console.info("Security_IAM_PIN_Update_Func_0102 updateresult = " + updateresult); expect(ResultCode.SUCCESS).assertEqual(updateresult); @@ -1103,7 +1104,7 @@ describe('userauthTest', function () { publicFC.publicOpenSession(UserIDM, function (data) { let challenge = data; console.info("Security_IAM_PIN_Update_Func_0103 challenge = " + challenge); - publicFC.publicaddCredential(UserIDM, CredentialInfopinnum, function (data) { + publicFC.publicaddCredential(UserIDM, CredentialInfopinmix, function (data) { let addcredresult103 = data.addcredresult; console.info("Security_IAM_PIN_Update_Func_0103 addcredresult103 = " + addcredresult103); publicFC.publicauth(UserAuth, challenge, AuthType.PIN, AuthTurstLevel.ATL1, function (data) { @@ -1116,9 +1117,9 @@ describe('userauthTest', function () { await setTimeout( publicFC.publicRegisterInputer(PinAuth, AuthSubType.PIN_SIX, Inputerdata), 500) console.info("Security_IAM_PIN_Update_Func_0103 challenge = " + challenge); - CredentialInfopinnum.token = token - console.info("PIN_Update_Func_0103 Infopinnum.token = " + CredentialInfopinnum.token); - await publicFC.publicupdateCred(UserIDM, CredentialInfopinnum, function (data) { + CredentialInfopinsix.token = token + console.info("PIN_Update_Func_0103 Infopinnum.token = " + CredentialInfopinsix.token); + await publicFC.publicupdateCred(UserIDM, CredentialInfopinsix, function (data) { let updateresult = data.updateCredresult; console.info("Security_IAM_PIN_Update_Func_0103 updateresult = " + updateresult); expect(ResultCode.SUCCESS).assertEqual(updateresult); diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Kit_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Kit_CallbackJsunit.test.js index 5bab9d1d7..ba2392325 100644 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Kit_CallbackJsunit.test.js +++ b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_Kit_CallbackJsunit.test.js @@ -15,10 +15,10 @@ import {describe, it, expect} from 'deccjsunit/index' -import userAuth from '@ohos.userauth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' -import userAuthNorth from '@ohos.userauthnorth' +import userAuth from '@ohos.userAuth' +import userIDM from '@ohos.userIDM' +import pinAuth from '@ohos.pinAuth' +import userAuthNorth from '@ohos.userIAM.userAuth' import * as publicFC from './Publicfunction-n' @@ -130,7 +130,7 @@ function sleep(ms) { describe('userauthTest', function () { - it('GetVersionTest_Kit_0101', 0, async function (done) { + it('Security_IAM_PIN_Kit_Func_0101', 0, async function (done) { try { let getversionresult = null; getversionresult = UserAuthKit.getVersion(); @@ -143,7 +143,7 @@ describe('userauthTest', function () { } }) - it('GetAvailabeStatusTest_Kit_0101', 1, async function (done) { + it('Security_IAM_PIN_Kit_Func_0102', 1, async function (done) { console.info('testFace GetAvailabeStatusTest0101 start'); try { publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata) @@ -197,7 +197,7 @@ describe('userauthTest', function () { }) -it('AuthTest_Kit_0101', 0, async function (done) { +it('Security_IAM_PIN_Kit_Func_0103', 0, async function (done) { try { publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata) let challenge ; @@ -267,18 +267,18 @@ it('AuthTest_Kit_0101', 0, async function (done) { } }) - it('Security_IAM_Face_Interface_check_AuthTrustLevel_Kit_0101', 0, async function (done) { - console.info('testFace Security_IAM_Face_Interface_check_AuthTrustLevel_0101 start'); + it('Security_IAM_PIN_Kit_Func_0104', 0, async function (done) { + console.info('testFace Security_IAM_PIN_Kit_Func_0104 start'); expect(10000).assertEqual(userAuthNorth.AuthTrustLevel.ATL1); expect(20000).assertEqual(userAuthNorth.AuthTrustLevel.ATL2); expect(30000).assertEqual(userAuthNorth.AuthTrustLevel.ATL3); expect(40000).assertEqual(userAuthNorth.AuthTrustLevel.ATL4); - console.info('testFace Security_IAM_Face_Interface_check_AuthTrustLevel_0101 end'); + console.info('testFace Security_IAM_PIN_Kit_Func_0104 end'); done(); }) - it('Security_IAM_Face_Interface_check_userauthFaceTipsCode_Kit_0101', 0, async function (done) { - console.info('testFace Security_IAM_Face_Interface_check_userauthFaceTipsCode_0101 start'); + it('Security_IAM_PIN_Kit_Func_0105', 0, async function (done) { + console.info('testFace Security_IAM_PIN_Kit_Func_0105 start'); expect(1).assertEqual(userAuthNorth.FaceTipsCode.FACE_AUTH_TIP_TOO_BRIGHT); expect(2).assertEqual(userAuthNorth.FaceTipsCode.FACE_AUTH_TIP_TOO_DARK); expect(3).assertEqual(userAuthNorth.FaceTipsCode.FACE_AUTH_TIP_TOO_CLOSE); @@ -290,20 +290,20 @@ it('AuthTest_Kit_0101', 0, async function (done) { expect(9).assertEqual(userAuthNorth.FaceTipsCode.FACE_AUTH_TIP_TOO_MUCH_MOTION); expect(10).assertEqual(userAuthNorth.FaceTipsCode.FACE_AUTH_TIP_POOR_GAZE); expect(11).assertEqual(userAuthNorth.FaceTipsCode.FACE_AUTH_TIP_NOT_DETECTED); - console.info('testFace Security_IAM_Face_Interface_check_userauthFaceTipsCode_0101 end'); + console.info('testFace Security_IAM_PIN_Kit_Func_0105 end'); done(); }) - it('Security_IAM_Face_Interface_check_userauthAuthType_Kit_0101', 0, async function (done) { - console.info('testFace Security_IAM_Face_Interface_check_userauthAuthType_Kit_0101 start'); + it('Security_IAM_PIN_Kit_Func_0106', 0, async function (done) { + console.info('testFace Security_IAM_PIN_Kit_Func_0106 start'); expect(1).assertEqual(userAuthNorth.AuthType.PIN); expect(2).assertEqual(userAuthNorth.AuthType.FACE); - console.info('testFace Security_IAM_Face_Interface_check_userauthAuthType_Kit_0101 end'); + console.info('testFace Security_IAM_PIN_Kit_Func_0106 end'); done(); }) - it('Security_IAM_Face_Interface_check_userauthResultCode_Kit_0101', 0, async function (done) { - console.info('testFace Security_IAM_Face_Interface_check_userauthResultCode_0101 start'); + it('Security_IAM_PIN_Kit_Func_0107', 0, async function (done) { + console.info('testFace Security_IAM_PIN_Kit_Func_0107 start'); expect(0).assertEqual(userAuthNorth.ResultCode.SUCCESS); expect(1).assertEqual(userAuthNorth.ResultCode.FAIL); expect(2).assertEqual(userAuthNorth.ResultCode.GENERAL_ERROR); @@ -315,19 +315,19 @@ it('AuthTest_Kit_0101', 0, async function (done) { expect(8).assertEqual(userAuthNorth.ResultCode.INVALID_PARAMETERS); expect(9).assertEqual(userAuthNorth.ResultCode.LOCKED); expect(10).assertEqual(userAuthNorth.ResultCode.NOT_ENROLLED); - console.info('testFace Security_IAM_Face_Interface_check_userauthResultCode_0101 end'); + console.info('testFace Security_IAM_PIN_Kit_Func_0107 end'); done(); }) - it('Security_IAM_Face_Interface_check_userauthFingerprintTips_Kit_0101', 0, async function (done) { - console.info('testFace Security_IAM_Face_Interface_check_userauthFingerprintTips_Kit_0101 start'); + it('Security_IAM_PIN_Kit_Func_0108', 0, async function (done) { + console.info('testFace Security_IAM_PIN_Kit_Func_0108 start'); expect(0).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_TIP_GOOD ); expect(1).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_TIP_IMAGER_DIRTY); expect(2).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_TIP_INSUFFICIENT); expect(3).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_TIP_PARTIAL); expect(4).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_TIP_TOO_FAST); expect(5).assertEqual(userAuthNorth.FingerprintTips.FINGERPRINT_TIP_TOO_SLOW); - console.info('testFace Security_IAM_Face_Interface_check_userauthFingerprintTips_Kit_0101 end'); + console.info('testFace Security_IAM_PIN_Kit_Func_0108 end'); done(); }) diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_MTBF_CallbackJsunit.test.js b/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_MTBF_CallbackJsunit.test.js deleted file mode 100644 index 3a9cae5c3..000000000 --- a/useriam/face_auth/js_api_test/function_test/userauthpart2/entry/src/main/js/test/Security_IAM_PIN_MTBF_CallbackJsunit.test.js +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (C) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {describe, it, expect} from 'deccjsunit/index' -import userAuth from '@ohos.userauth' -import userIDM from '@ohos.useridm' -import pinAuth from '@ohos.pinauth' -import * as publicFC from './Publicfunction-n' - -let UserIDM = userIDM.constructor() -let PinAuth = pinAuth.constructor() -let UserAuth = userAuth.constructor() - -let AuthType = { - PIN : 1, - FACE : 2 -} -let AuthSubType = { - PIN_SIX : 10000, - PIN_NUMBER : 10001, - PIN_MIXED : 10002, - FACE_2D : 20000, - FACE_3D : 20001 -} -let AuthTurstLevel = { - ATL1 : 10000, - ATL2 : 20000, - ATL3 : 30000, - ATL4 : 40000 -} - -let userID = { - User1: 100, - User2: 2, - User3: 3, - User4: 4, - User5: 5 -} - -let ResultCode = { - SUCCESS : 0, - FAIL : 1, - GENERAL_ERROR : 2, - CANCELED : 3, - TIMEOUT : 4, - TYPE_NOT_SUPPORT : 5, - TRUST_LEVEL_NOT_SUPPORT : 6, - BUSY : 7, - INVALID_PARAMETERS : 8, - LOCKED : 9, - NOT_ENROLLED : 10 -} - -let Inputerdata = new Uint8Array([1,2,3,4,5,6]); - -let CredentialInfopinsix = { - credType: AuthType.PIN, - credSubType: AuthSubType.PIN_SIX, - token: null -} - -function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); -} - -function authcycle(challenge,fcycle){ - let finishicon = 0 - let token; - for(let i = 0; i < 10; i++){ - //未到达10个认证时,完成认证 - //闭包方法 - (function c(output){ - publicFC.publicauth(UserAuth ,challenge,AuthType.PIN,AuthTurstLevel.ATL1, - function (data) { - expect(true).assertEqual(data.authresult); - console.info('testFace PIN_Auth_MTBF_0101 auth '+output + '=' + data.authresult); - token = data.authextr.token - if(i == 9){ - finishicon = 1 - } - }, - function(data){ - }) - })(i) - } - publicFC.publicauth(UserAuth, challenge,AuthType.PIN,AuthTurstLevel.ATL1, - async function (data) { - console.info('testFace PIN_Auth_MTBF_0101 auth11 =' + data.authresult); - if(data.authresult == ResultCode.SUCCESS){ - token = data.authextr.token - } - while(finishicon = 0){ - await sleep(100); - } - fcycle(token) - }, - function(data){ - }) -} - -function authUsercycle(challenge,fcycle){ - let finishicon = 0 - let token; - for(let i = 0; i < 10; i++){ - //未到达10个认证时,完成认证 - //闭包方法 - (function c(output){ - publicFC.publicauthUser(UserAuth ,userID.User1,challenge,AuthType.PIN,AuthTurstLevel.ATL1, - function (data) { - expect(true).assertEqual(data.authresult); - console.info('testFace PIN_Auth_MTBF_0101 auth '+output + '=' + data.authresult); - token = data.authextr.token - if(i == 9){ - finishicon = 1 - } - }, - function(data){ - }) - })(i) - } - publicFC.publicauthUser(UserAuth, userID.User1,challenge,AuthType.PIN,AuthTurstLevel.ATL1, - async function (data) { - console.info('testFace PIN_Auth_MTBF_0101 auth11 =' + data.authresult); - if(data.authresult == ResultCode.SUCCESS){ - token = data.authextr.token - } - while(finishicon = 0){ - await sleep(100); - } - fcycle(token) - }, - function(data){ - }) -} - -describe('userauthTest', function () { - - it('Security_IAM_PIN_Auth_MTBF_0101', 4, async function (done) { - try { - publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata); - let challenge ; - publicFC.publicOpenSession(UserIDM, function (data) { - console.info('testFace PIN_Auth_MTBF_0102 OpenSession challenge = ' + data); - challenge = data; - publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, function (data) { - console.info('testFace PIN_Auth_MTBF_0102 addCredential onResult = ' + JSON.stringify(data)); - authcycle(challenge,function(data){ - publicFC.publicdelUser(UserIDM,data, function (data) { - console.info('testFace PIN_Auth_MTBF_0102 delUser onResult = ' + JSON.stringify(data)); - publicFC.publicCloseSession(UserIDM, function (data) { - console.info('testFace PIN_Auth_MTBF_0102 publicCloseSession'); - publicFC.publicunRegisterInputer(PinAuth, function (data) { - console.info('testFace PIN_Auth_MTBF_0102 publicunRegisterInputer'); - done(); - }) - }) - }, function (data) { - }) - }) - }, function (data) { - }) - }) - } catch (e) { - console.log("testauthpin101 fail " + e); - expect(null).assertFail(); - } - }) - - it('Security_IAM_PIN_Auth_MTBF_0102', 4, async function (done) { - try { - publicFC.publicRegisterInputer(PinAuth,AuthSubType.PIN_SIX,Inputerdata); - let challenge ; - let finishicon = 0 - publicFC.publicOpenSession(UserIDM, function (data) { - console.info('testFace PIN_Auth_MTBF_0102 OpenSession challenge = ' + data); - challenge = data; - publicFC.publicaddCredential(UserIDM,CredentialInfopinsix, function (data) { - console.info('testFace PIN_Auth_MTBF_0102 addCredential onResult = ' + JSON.stringify(data)); - authUsercycle(challenge,function(data){ - publicFC.publicdelUser(UserIDM,data, function (data) { - console.info('testFace PIN_Auth_MTBF_0102 delUser onResult = ' + JSON.stringify(data)); - publicFC.publicCloseSession(UserIDM, function (data) { - console.info('testFace PIN_Auth_MTBF_0102 publicCloseSession'); - publicFC.publicunRegisterInputer(PinAuth, function (data) { - console.info('testFace PIN_Auth_MTBF_0102 publicunRegisterInputer'); - done(); - }) - }) - }, function (data) { - }) - }) - }, function (data) { - }) - }) - } catch (e) { - console.log("testauthpin101 fail " + e); - expect(null).assertFail(); - } - }) -}) diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/signature/.DS_Store b/useriam/face_auth/js_api_test/function_test/userauthpart2/signature/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4c945ca06a48c82b725e98e790a34239704e6af0 GIT binary patch literal 6148 zcmeHKJxc>Y5PhR50ye4Ca(f|QWxENnu=WS2r-DV|i6Nlf{VRW-zPGbV4v$nKA~Ue_ zW_Lbz@4@W{0Gn^_PJs!4F`Lk242XsYU3)cHXr;yjZt#p1T09OE`inza`w`dsgnO=e zd;PDt!Wu8s4Zmtl|CCW@XfBrRZL@3}W{S2qwv+cFw1C5%)ppmKF@L&Ms}u|s3ryOC6?4VTksgY9 zD$!G|J~7PGIi6}fBjDt{^5vy#w3%0o|XxqG#WV)ICK;HSte6*9vw3AQ6x-*l>Op?hv zNoFQ9%_@ZmRWFMruope-VYi4Nd+^{<77;wT7Zn6A9t2qsy!D_5BMVi${NefW<2n7G z-&app55Z)~n_qbSh(9`A!p_C+PnMc9bUTJ&_!77f09VV zCkgCMa%2v@wu?3mw`nG?;TvZFX}uXp;#*(~BsY>l&~DBm0n%4>k~BAo*6bXAw(_EX z(ErC9nvSV?X7af6#_`uH>jat2Z4+rCw~<7yzp1r+b2zKt&XL)xnHhd}`U19gLGGJ~ z*M>b89ZaudZ@wyxX&UOL1w(;?mcVKbqjuPmLNlW9fiSBO@#TjL8^Vg#xg$ZHXv?i8se z%eY=PzbDjjv)YT~+IXL9ATg9$9&eXQBw%xn0Mu%&jtV_X!aa8s=%zA&>a;(%eBPo| z-5wh42AbZT%N^#6el!ehr-6(;O7X;IXw(P00qGV>WlNJ_$kFtG+n2H=1to@3AfrJT z))gUwqOXCXlI~|2AxQPT2HKUHyEJ1dM2W{8KxK=ZO*xX)Y^TSq9O{x@UmLTEkOI|0 z*l+nc1qyV??*}klF`aTd;u?@%2kL_OI-`_uBd|%TInNzjWERFa4Z6{XX~T p@~5%2*y;*)!e6_1&k9KM<ECLGJ177E delta 974 zcmY+DO^D-k7>75V%&a4=!U_ZKWyW|AoUf!`lMbxwKOd8%GfA5^=||{cnlx?Nv`L$f zrim+s9tJ@XhF)Y3x*k?M>4L%{2(sP;Sz%dJ@F0Ss7hTZ9oCLcgJL2(ue(&@0UVdj+ zf4@3KXNm60>dPnW$yoxr9J@73C<|1HK@j#VnpjyqK4Bq!364R_m(bbr%73fStr>g< z&)~maL&mz}c5Q3hY7TT{AHjCe9TeHRz?$7!U~CI%4u{*VuIo8n)%P9?UU>TX+G%g+ z^uhDVY%;Z%Oz&a%7Gl}ncC+p2&ce!OGRZ8uz^`v1UO0Sw-_iSe)76oA9NI|OhV8cW zvEH|bx-;K{uCEm+k_2k90|Jf!9gdbtMMaM0Z$TeSg&vJHES};bL6TEdLlgLj4i+@J zU_HX;MK>VDI#m%xh7R(S)T7Hh0T_VEG)eIJhNYw`hB|1OYBFQ-B|4yj^KF(6jHt;} ze0^Z_)gCSKApNgp@N8KwO%GbkLX>E6@x+s8avnWNWS-#86)@qC)D+QI2Zo^yu(4{H zK~(}0(a}bR*()@xqR0_Mr*l3PMV=r6fdrrg4kO){Fq#(WaW-I#WZPE*HVSh!U-1G{ z@@rg=t)WI{(y(+v@2Hwc5-r(j)hTRJCu<5xM6_ep4=vmlInEMVe)1@c4s47IWD2y2 zj!R>@Dw2eN(n%q04|WQ%_Eb*xrQ|`Chfoqv*}4C<@G~fmR;kpS#r!t6X5bL)AucB z><)9)P%oB?TsR&y`H7t`gC0Smo+B^~%P+7%NZb7`S}iy0BcjN%on6^zYZSg|mNY69 z7k|;S{JBhP3+wqrPiM?>?v$Pg` jyTpHg6G>cIf9{U`%dhVr-#aeee&^2D?ias3sQvs8|3pQC diff --git a/useriam/face_auth/js_api_test/function_test/userauthpart2/signature/openharmony_sx_base.p7b b/useriam/face_auth/js_api_test/function_test/userauthpart2/signature/openharmony_sx_base.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 GIT binary patch literal 3437 zcmcgvX>b$g8MY4FF(5FQyMT=#m||qU)nQ9cId-MBB-<-lvSdq&snM}IENNF>t+bK| zgowuF2vC|SxSZxNN5eHhV%(WPpbeB9Fc3;JDMtzMBv1-XAc2N~c2_tCXW&OCGw6qQ z-s9VS-tT?h=bI0tMS+~WDXqHJyCPmLzdbE-fV8Nd&*MRZfG8(#POFZG3xs@Lb{0ry z=R8j3wWo!5g=yjKx#BoZMFS)uA)H}cTp@-^K`9VV?RC3J59@}eik*>n|pRKOLZ zxdn7G!Yv@9O#y<&eUy{)vMXb;fQR)ffVAADQsEMXm;IBMDLfLD0w^U;6%HVo-0Q_5 zCHEa?DBuauNpZzoF+tK27w#n~?u%toS-DhR4k@Q*{7x^8Q=D6&kd^_~J#VVG2LXkL zaAy=}U*?Jto)9hx5MGjdp9hcQAu@tfk_;l!PeyxPY<8b&+&D!CyaBh9=8BSVKLpk4 z4Ml3yY|&Th)vyK4cpC{!uU8v2YBlVV`d~(nz&<@{G1oe*DHub1z7~J5*;s2bX<)_* zV_GbsPQg`(&rpxRb_*Od7}++3+liSw-$!1 zs5*g}EHWhI3i|!-FcfzYL0`SL-rq>LENC;PMl)G(0(1U2%Va|smp0UFx0xd@soZA* zD5LYc4OlbE7@ARt#h}rr3>K@bf%B#^-c+xz8Hr)0D5ExIFltezN@Hn8>o5d~bSfYtkc+_Z&kI#-N5_GhCg*V-^TSO=!G~ z(fXy{n2XV+k}6w_W`dTOP2a4u0ly;ANZ>4OxSKAzFB!yBzdo`gX zO?o|H@WiAw$y6l?=^3jA_Hy0S)nTYs12;4hKE&ekQ|>?|ZLJ}#F`2BczC7kdE4@xV zZBD_)Otwjhz+NSaz?d45!;FsGSu-#qh#hStD%B}f!mCT!KqzSo>I`NGH_9Dea$1Qi zg29Ydt!~lQVR99_T7#Hije~(12drl-P)SV?QR*9sus`8th-8^OQ7@xI$(Yp|^;bL1 zR50O$mDXw6P>i7B(TJ)ciPzTE>XY%X6HAa)b#OBRXv&~%Bw|J#Y><i4=e%95bjtw|cJp=#P#Pf#*luqI_wR;fISDCJhAqSG6R%xItn%~QtZ@m%&u zjGGLX;t6Ls62eQvNmf@v+}J%54^CygxRZ`?8X#r|wkev7(s;Ou4T#y1XNNf)h;o7z z8a^Lfq<1uH`E{G9E z*(=)Css_LSk=>E9jr)s5^2-!+MN=Ds}>1hRma4`uCIz9%p3O77839E{xf z4c_I?**|1`K2tg4!Hvyrou4BsJQuv*UfF)<%CelYIS>D^o?X)3+MK%la6kooW8&G@BU)Y0hT`+mOm$Z_%rB=a%o>I z!2c6lHyKQN)VjiFwa!eE^p8jc$sy$vB+8i25lI~6KPFFh$!o$avA~rj#L6xvR|Z83 z*WD6T9e+5Pyy=F+)pNTf{ny3cy>7Rkd3o*TS?TZJ`NS^NF2%HMkyS{?uJ$`!P4_L^ z1`NFDUbNyg_qREifgktnp1_v{Jbb`7m}2PTyUdOmtJj~m z9bB=ecw4_^rw1IW=of+>nrW5=d3k`3qHCxsIN_F{T1A545};;+fsyC&qChi+YV zr~M63H8ZLCPYmsjY>ls9cL%I)F|JIW-#+48$+lD4k*(P*kDM%zx_fvu4u5ZYUnI}5 zdrycFq>xFU)&X3p@pP2u%$o}}YcRn(MhJ&B2o?KS@cIVz>Ye%o^xV?CB{_Qhu z;}_q1bvO^g{8<3!gYbo4Di{8qzV+(9 zdlmksohQmRTs@qB;(Wo?dER_ux6XQb@q$tQPW?CMu6GVQd;R=iR;-S{Kr%Zks7>b1 zNs{|-+jhObYE}NR&`TGGr^h^4bjh%c>R#@=8nM&Md>_a+zVulsl;){flFekV1t9ob z+SqfV_Pv3$2f)bQ8%Ul2>fdYR^1zs0BQF~olsOj5AodC&Q_7SMFzsz2 z9newxE&jodk~tNHwl%LBMMDbrk=(^b literal 0 HcmV?d00001 -- GitLab