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 "no_interaction_auth.h"
17
18 #include <memory>
19
20 #include "dm_constants.h"
21 #include "dm_log.h"
22 #include "nlohmann/json.hpp"
23
24 namespace OHOS {
25 namespace DistributedHardware {
NoInteractionAuth()26 NoInteractionAuth::NoInteractionAuth()
27 {
28 LOGI("NoInteractionAuth constructor");
29 }
30
~NoInteractionAuth()31 NoInteractionAuth::~NoInteractionAuth()
32 {
33 }
34
ShowAuthInfo(std::string & authToken,std::shared_ptr<DmAuthManager> authManager)35 int32_t NoInteractionAuth::ShowAuthInfo(std::string &authToken, std::shared_ptr<DmAuthManager> authManager)
36 {
37 return DM_OK;
38 }
39
StartAuth(std::string & authToken,std::shared_ptr<DmAuthManager> authManager)40 int32_t NoInteractionAuth::StartAuth(std::string &authToken, std::shared_ptr<DmAuthManager> authManager)
41 {
42 return DM_OK;
43 }
44
VerifyAuthentication(std::string & authToken,const std::string & authParam)45 int32_t NoInteractionAuth::VerifyAuthentication(std::string &authToken, const std::string &authParam)
46 {
47 return DM_OK;
48 }
49
CloseAuthInfo(const int32_t & pageId,std::shared_ptr<DmAuthManager> authManager)50 int32_t NoInteractionAuth::CloseAuthInfo(const int32_t &pageId, std::shared_ptr<DmAuthManager> authManager)
51 {
52 return DM_OK;
53 }
54
UpdateAuthInfo(const int32_t & pageId)55 int32_t NoInteractionAuth::UpdateAuthInfo(const int32_t &pageId)
56 {
57 return DM_OK;
58 }
59
CreatePinAuthObject(void)60 extern "C" IAuthentication *CreatePinAuthObject(void)
61 {
62 return new NoInteractionAuth;
63 }
64 } // namespace DistributedHardware
65 } // namespace OHOS
66