1 /*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "napi_account_iam_module.h"
17
18 #include "account_log_wrapper.h"
19 #if defined(HAS_USER_AUTH_PART) || defined(HAS_PIN_AUTH_PART)
20 #include "napi_account_iam_constant.h"
21 #endif
22 #ifdef HAS_USER_AUTH_PART
23 #include "napi_account_iam_identity_manager.h"
24 #include "napi_account_iam_user_auth.h"
25 #endif
26 #ifdef HAS_PIN_AUTH_PART
27 #include "napi_account_iam_pin_auth.h"
28 #endif
29 #include "napi_account_iam_inputer_manager.h"
30
31 namespace OHOS {
32 namespace AccountJsKit {
33 using namespace OHOS::AccountSA;
34
AccountIAMInit(napi_env env,napi_value exports)35 napi_value AccountIAMInit(napi_env env, napi_value exports)
36 {
37 #ifdef HAS_PIN_AUTH_PART
38 NapiAccountIAMPINAuth::Init(env, exports);
39 #endif
40 #ifdef HAS_USER_AUTH_PART
41 NapiAccountIAMIdentityManager::Init(env, exports);
42 NapiAccountIAMUserAuth::Init(env, exports);
43 #endif
44 #if defined(HAS_PIN_AUTH_PART) || defined(HAS_USER_AUTH_PART)
45 NapiAccountIAMConstant::Init(env, exports);
46 #endif
47 NapiAccountIAMInputerManager::Init(env, exports);
48 return exports;
49 }
50 } // namespace AccountJsKit
51 } // namespace OHOS
52