1 /* 2 * Copyright (c) 2021 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 #ifndef OS_ACCOUNT_SERVICES_ACCOUNTMGR_INCLUDE_APPACCOUNT_IAPP_ACCOUNT_AUTHENTICATOR_H 17 #define OS_ACCOUNT_SERVICES_ACCOUNTMGR_INCLUDE_APPACCOUNT_IAPP_ACCOUNT_AUTHENTICATOR_H 18 19 #include "accountmgr_service_ipc_interface_code.h" 20 #include "app_account_common.h" 21 #include "iremote_broker.h" 22 #include "want_params.h" 23 24 namespace OHOS { 25 namespace AccountSA { 26 class IAppAccountAuthenticator : public IRemoteBroker { 27 public: 28 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.accountfwk.IAppAccountAuthenticator"); 29 30 virtual ErrCode AddAccountImplicitly(const std::string &authType, const std::string &callerBundleName, 31 const AAFwk::WantParams &options, const sptr<IRemoteObject> &callback) = 0; 32 virtual ErrCode Authenticate( 33 const std::string &name, const std::string &authType, const std::string &callerBundleName, 34 const AAFwk::WantParams &options, const sptr<IRemoteObject> &callback) = 0; 35 virtual ErrCode VerifyCredential( 36 const std::string &name, const VerifyCredentialOptions &options, const sptr<IRemoteObject> &callback) = 0; 37 virtual ErrCode CheckAccountLabels( 38 const std::string &name, const std::vector<std::string> &labels, const sptr<IRemoteObject> &callback) = 0; 39 virtual ErrCode SetProperties(const SetPropertiesOptions &options, const sptr<IRemoteObject> &callback) = 0; 40 virtual ErrCode IsAccountRemovable(const std::string &name, const sptr<IRemoteObject> &callback) = 0; 41 virtual ErrCode CreateAccountImplicitly( 42 const CreateAccountImplicitlyOptions &options, const sptr<IRemoteObject> &callback) = 0; 43 virtual ErrCode Auth(const std::string &name, const std::string &authType, 44 const AAFwk::WantParams &options, const sptr<IRemoteObject> &callback) = 0; 45 }; 46 } // namespace AccountSA 47 } // namespace OHOS 48 49 #endif // OS_ACCOUNT_SERVICES_ACCOUNTMGR_INCLUDE_APPACCOUNT_IAPP_ACCOUNT_AUTHENTICATOR_H 50