diff --git a/README_ZH.md b/README_ZH.md index 0b898f8cbfe5ac7a97ad6870103f923e6a2573f7..cce87d8bc0a1e89657a82bd5750b0991e89fcd20 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -45,7 +45,7 @@ | 接口名 | 描述 | | ------ | -------------------------------- | -| getAvailabeStatus(authType : AuthType, authTrustLevel : AuthTurstLevel) : number; | 指定ATL,查询是否支持目标认证方式 | +| getAvailableStatus(authType : AuthType, authTrustLevel : AuthTurstLevel) : number; | 指定ATL,查询是否支持目标认证方式 | | auth(challenge: BigInt, authType : AuthType, authTrustLevel: AuthTurstLevel, callback: IUserAuthCallback): BigInt; | 指定ATL和认证方式,完成用户身份认证 | ### 使用说明 diff --git a/bundle.json b/bundle.json index 9127848632756302e236b397794e055a5fa78117..f12c853858fafc1e980b8afab69a164fea3f778c 100644 --- a/bundle.json +++ b/bundle.json @@ -16,7 +16,7 @@ "name": "user_auth", "subsystem": "useriam", "adapted_system_type": [ "standard" ], - "syscap": ["SystemCapability.UserIAM.UserAuth"], + "syscap": ["SystemCapability.UserIAM.UserAuth.Core"], "features": [], "rom": "2400KB", "ram": "1500KB", diff --git a/interfaces/innerkits/js/ohos.UserIAM.userAuth.d.ts b/interfaces/innerkits/js/ohos.UserIAM.userAuth.d.ts index 527826a6d058aa35232e86e463a06c9b5edfe7d2..3599a1b85fe608daa1b329a3ec6db442b519eece 100755 --- a/interfaces/innerkits/js/ohos.UserIAM.userAuth.d.ts +++ b/interfaces/innerkits/js/ohos.UserIAM.userAuth.d.ts @@ -49,9 +49,9 @@ declare namespace userIAM *

Permissions required: {@code ohos.permission.ACCESS_USER_AUTH_INTERNAL} * @param authType Credential type for authentication. * @param authTrustLevel Credibility level of certification results. - * @return Returns a check result, which is specified by getAvailabeStatus. + * @return Returns a check result, which is specified by getAvailableStatus. */ - getAvailabeStatus(authType : AuthType, authTrustLevel : AuthTrustLevel) : number; + getAvailableStatus(authType : AuthType, authTrustLevel : AuthTrustLevel) : number; /** * Get the attribute, pass in the credential type and the key to get, and return the value corresponding to the key. diff --git a/interfaces/innerkits/napi/include/user_auth_helper.h b/interfaces/innerkits/napi/include/user_auth_helper.h index c00744c82fb82805ce71967c9e8a8b08417096cb..ebe0b46e120f9ecf66f668216637554f051d8e76 100755 --- a/interfaces/innerkits/napi/include/user_auth_helper.h +++ b/interfaces/innerkits/napi/include/user_auth_helper.h @@ -70,7 +70,7 @@ napi_value GetVersion(napi_env env, napi_callback_info info); * @param info * @return napi_value Verify that the certification capability is available */ -napi_value GetAvailabeStatus(napi_env env, napi_callback_info info); +napi_value GetAvailableStatus(napi_env env, napi_callback_info info); /** * @brief Get the Property object diff --git a/interfaces/innerkits/napi/include/user_auth_impl.h b/interfaces/innerkits/napi/include/user_auth_impl.h index da9c40b6fd32b14d9d72d0d089c83ae7aade127b..a6521eeea2200f75cc1a23f430735ba351263b53 100755 --- a/interfaces/innerkits/napi/include/user_auth_impl.h +++ b/interfaces/innerkits/napi/include/user_auth_impl.h @@ -35,7 +35,7 @@ public: ~UserAuthImpl(); AuthBuild authBuild; napi_value GetVersion(napi_env env, napi_callback_info info); - napi_value GetAvailabeStatus(napi_env env, napi_callback_info info); + napi_value GetAvailableStatus(napi_env env, napi_callback_info info); napi_value GetProperty(napi_env env, napi_callback_info info); napi_value SetProperty(napi_env env, napi_callback_info info); napi_value Auth(napi_env env, napi_callback_info info); diff --git a/interfaces/innerkits/napi/src/user_auth_helper.cpp b/interfaces/innerkits/napi/src/user_auth_helper.cpp index 4e6ffc220f131a197af0ab713145683144d3a0bd..2d656c160933872be6825edd4d81fce37d5152b8 100755 --- a/interfaces/innerkits/napi/src/user_auth_helper.cpp +++ b/interfaces/innerkits/napi/src/user_auth_helper.cpp @@ -74,7 +74,7 @@ napi_value GetVersion(napi_env env, napi_callback_info info) * @param info * @return napi_value Verify that the certification capability is available */ -napi_value GetAvailabeStatus(napi_env env, napi_callback_info info) +napi_value GetAvailableStatus(napi_env env, napi_callback_info info) { napi_value thisVar = nullptr; size_t argcAsync = 0; @@ -82,8 +82,8 @@ napi_value GetAvailabeStatus(napi_env env, napi_callback_info info) NAPI_CALL(env, napi_get_cb_info(env, info, &argcAsync, args, &thisVar, nullptr)); UserAuthImpl *userAuthImpl = nullptr; NAPI_CALL(env, napi_unwrap(env, thisVar, (void **)&userAuthImpl)); - HILOG_INFO("UserAuthHelper, getAvailabeStatus"); - return userAuthImpl->GetAvailabeStatus(env, info); + HILOG_INFO("UserAuthHelper, getAvailableStatus"); + return userAuthImpl->GetAvailableStatus(env, info); } /** @@ -228,7 +228,7 @@ napi_value GetCtor(napi_env env) napi_value cons = nullptr; napi_property_descriptor clzDes[] = { DECLARE_NAPI_FUNCTION("getVersion", UserAuth::GetVersion), - DECLARE_NAPI_FUNCTION("getAvailabeStatus", UserAuth::GetAvailabeStatus), + DECLARE_NAPI_FUNCTION("getAvailableStatus", UserAuth::GetAvailableStatus), DECLARE_NAPI_FUNCTION("getProperty", UserAuth::GetProperty), DECLARE_NAPI_FUNCTION("setProperty", UserAuth::SetProperty), DECLARE_NAPI_FUNCTION("auth", UserAuth::Auth), diff --git a/interfaces/innerkits/napi/src/user_auth_impl.cpp b/interfaces/innerkits/napi/src/user_auth_impl.cpp index f77011c17d613e2373ae08bb19e2a945770018ae..06e504a472c3a384b731313e3a0fd88d04e69b96 100755 --- a/interfaces/innerkits/napi/src/user_auth_impl.cpp +++ b/interfaces/innerkits/napi/src/user_auth_impl.cpp @@ -44,7 +44,7 @@ napi_value UserAuthImpl::GetVersion(napi_env env, napi_callback_info info) return version; } -napi_value UserAuthImpl::GetAvailabeStatus(napi_env env, napi_callback_info info) +napi_value UserAuthImpl::GetAvailableStatus(napi_env env, napi_callback_info info) { napi_value argv[ARGS_MAX_COUNT] = {nullptr}; size_t argc = ARGS_MAX_COUNT; @@ -66,7 +66,7 @@ napi_value UserAuthImpl::GetAvailabeStatus(napi_env env, napi_callback_info info AuthType authType = AuthType(type); AuthTurstLevel authTurstLevel = AuthTurstLevel(level); int32_t result = UserAuth::GetInstance().GetAvailableStatus(authType, authTurstLevel); - HILOG_INFO("GetAvailabeStatus result = %{public}d", result); + HILOG_INFO("GetAvailableStatus result = %{public}d", result); napi_value ret = 0; NAPI_CALL(env, napi_create_int32(env, result, &ret)); return ret; diff --git a/interfaces/kits/napi/src/user_auth_helper_north.cpp b/interfaces/kits/napi/src/user_auth_helper_north.cpp index 2b4f842ab11c3ab353a14d9fe4eb57bfff323a4f..3ccc72517c44592954a425dd8f29831cfd3c709a 100755 --- a/interfaces/kits/napi/src/user_auth_helper_north.cpp +++ b/interfaces/kits/napi/src/user_auth_helper_north.cpp @@ -36,7 +36,7 @@ napi_value GetCtor(napi_env env) napi_value cons = nullptr; napi_property_descriptor clzDes[] = { DECLARE_NAPI_FUNCTION("getVersion", UserIAM::UserAuth::GetVersion), - DECLARE_NAPI_FUNCTION("getAvailabeStatus", UserIAM::UserAuth::GetAvailabeStatus), + DECLARE_NAPI_FUNCTION("getAvailableStatus", UserIAM::UserAuth::GetAvailableStatus), DECLARE_NAPI_FUNCTION("auth", UserIAM::UserAuth::Auth), }; NAPI_CALL(env, napi_define_class(env, "UserAuthNorth", NAPI_AUTO_LENGTH,