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 "mock_app_account_authenticator_stub.h"
17 #include "account_log_wrapper.h"
18
19 namespace OHOS {
20 namespace AccountSA {
AddAccountImplicitly(const std::string & authType,const std::string & callerBundleName,const AAFwk::WantParams & options,const sptr<IRemoteObject> & callback)21 ErrCode MockAppAccountAuthenticator::AddAccountImplicitly(
22 const std::string &authType, const std::string &callerBundleName,
23 const AAFwk::WantParams &options, const sptr<IRemoteObject> &callback)
24 {
25 status = false;
26 return ERR_OK;
27 }
28
Authenticate(const std::string & name,const std::string & authType,const std::string & callerBundleName,const AAFwk::WantParams & options,const sptr<IRemoteObject> & callback)29 ErrCode MockAppAccountAuthenticator::Authenticate(
30 const std::string &name, const std::string &authType, const std::string &callerBundleName,
31 const AAFwk::WantParams &options, const sptr<IRemoteObject> &callback)
32 {
33 status = false;
34 return ERR_OK;
35 }
36
VerifyCredential(const std::string & name,const VerifyCredentialOptions & options,const sptr<IRemoteObject> & callback)37 ErrCode MockAppAccountAuthenticator::VerifyCredential(
38 const std::string &name, const VerifyCredentialOptions &options, const sptr<IRemoteObject> &callback)
39 {
40 status = false;
41 return ERR_OK;
42 }
43
CheckAccountLabels(const std::string & name,const std::vector<std::string> & labels,const sptr<IRemoteObject> & callback)44 ErrCode MockAppAccountAuthenticator::CheckAccountLabels(
45 const std::string &name, const std::vector<std::string> &labels, const sptr<IRemoteObject> &callback)
46 {
47 status = false;
48 return ERR_OK;
49 }
50
SetProperties(const SetPropertiesOptions & options,const sptr<IRemoteObject> & callback)51 ErrCode MockAppAccountAuthenticator::SetProperties(
52 const SetPropertiesOptions &options, const sptr<IRemoteObject> &callback)
53 {
54 status = false;
55 return ERR_OK;
56 }
57
IsAccountRemovable(const std::string & name,const sptr<IRemoteObject> & callback)58 ErrCode MockAppAccountAuthenticator::IsAccountRemovable(const std::string &name, const sptr<IRemoteObject> &callback)
59 {
60 status = false;
61 return ERR_OK;
62 }
63
CreateAccountImplicitly(const CreateAccountImplicitlyOptions & options,const sptr<IRemoteObject> & callback)64 ErrCode MockAppAccountAuthenticator::CreateAccountImplicitly(
65 const CreateAccountImplicitlyOptions &options, const sptr<IRemoteObject> &callback)
66 {
67 status = false;
68 return ERR_OK;
69 }
70
Auth(const std::string & name,const std::string & authType,const AAFwk::WantParams & options,const sptr<IRemoteObject> & callback)71 ErrCode MockAppAccountAuthenticator::Auth(const std::string &name, const std::string &authType,
72 const AAFwk::WantParams &options, const sptr<IRemoteObject> &callback)
73 {
74 status = false;
75 return ERR_OK;
76 }
77 } // namespace AccountSA
78 } // namespace OHOS
79