/base/useriam/user_auth_framework/test/unittest/services/src/ |
D | attributes_test.cpp | 46 Attributes attrs; 52 …const std::vector<Attributes::AttributeKey> desired = {Attributes::ATTR_RESULT_CODE, Attributes::A… 53 … Attributes::ATTR_TEMPLATE_ID_LIST, Attributes::ATTR_REMAIN_TIMES, Attributes::ATTR_FREEZING_TIME, 54 Attributes::ATTR_SCHEDULE_ID, Attributes::ATTR_SCHEDULE_MODE}; 56 Attributes attrs; 58 EXPECT_TRUE(attrs.SetBoolValue(Attributes::ATTR_RESULT_CODE, true)); 59 EXPECT_TRUE(attrs.SetBoolValue(Attributes::ATTR_SIGNATURE, false)); 60 EXPECT_TRUE(attrs.SetUint64Value(Attributes::ATTR_SCHEDULE_ID, UINT64_MAX)); 61 EXPECT_TRUE(attrs.SetUint32ArrayValue(Attributes::ATTR_REMAIN_TIMES, {1, 3, 5, 7, 9})); 62 EXPECT_TRUE(attrs.SetUint32Value(Attributes::ATTR_SCHEDULE_MODE, UINT32_MAX)); [all …]
|
/base/useriam/user_auth_framework/frameworks/native/executors/include/framework/ |
D | framework_executor_callback.h | 41 const Attributes &commandAttrs) override; 42 int32_t OnEndExecute(uint64_t scheduleId, const Attributes &commandAttrs) override; 43 int32_t OnSetProperty(const Attributes &properties) override; 45 int32_t OnGetProperty(const Attributes &conditions, Attributes &results) override; 50 const Attributes &commandAttrs); 51 ResultCode OnEndExecuteInner(uint64_t scheduleId, const Attributes &consumerAttr); 52 ResultCode OnSetPropertyInner(const Attributes &properties); 53 ResultCode OnGetPropertyInner(std::shared_ptr<Attributes> conditions, 54 std::shared_ptr<Attributes> values); 55 ResultCode ProcessEnrollCommand(uint64_t scheduleId, const Attributes &properties); [all …]
|
/base/useriam/user_auth_framework/frameworks/native/executors/src/framework/ |
D | framework_executor_callback.cpp | 48 const Attributes &commandAttrs) in OnBeginExecute() 56 const Attributes &commandAttrs) in OnBeginExecuteInner() 61 commandAttrs.GetInt32Value(Attributes::ATTR_SCHEDULE_MODE, commandId); in OnBeginExecuteInner() 84 int32_t FrameworkExecutorCallback::OnEndExecute(uint64_t scheduleId, const Attributes &commandAttrs) in OnEndExecute() 89 ResultCode FrameworkExecutorCallback::OnEndExecuteInner(uint64_t scheduleId, const Attributes &cons… in OnEndExecuteInner() 113 int32_t FrameworkExecutorCallback::OnSetProperty(const Attributes &properties) in OnSetProperty() 118 ResultCode FrameworkExecutorCallback::OnSetPropertyInner(const Attributes &properties) in OnSetPropertyInner() 122 properties.GetUint32Value(Attributes::ATTR_PROPERTY_MODE, commandId); in OnSetPropertyInner() 137 int32_t FrameworkExecutorCallback::OnGetProperty(const Attributes &conditions, Attributes &results) in OnGetProperty() 139 auto cond = Common::MakeShared<Attributes>(conditions.Serialize()); in OnGetProperty() [all …]
|
/base/useriam/user_auth_framework/frameworks/native/common/attributes/src/ |
D | attributes.cpp | 28 class Attributes::Impl { 100 Attributes::Impl::Impl(const std::vector<uint8_t> &raw) in Impl() 102 std::map<Attributes::AttributeKey, const std::vector<uint8_t>> out; in Impl() 142 auto ret = out.try_emplace(static_cast<Attributes::AttributeKey>(type), value); in Impl() 160 Attributes::Impl::Impl(Attributes::Impl &&other) noexcept : map_(std::move(other.map_)) in Impl() 164 Attributes::Impl &Attributes::Impl::operator=(Attributes::Impl &&other) noexcept in operator =() 170 bool Attributes::Impl::CheckAttributeLength(const uint8_t *curr, const uint8_t *end, uint32_t lengt… in CheckAttributeLength() 183 bool Attributes::Impl::SetBoolValue(AttributeKey key, bool value) in SetBoolValue() 200 bool Attributes::Impl::SetUint64Value(AttributeKey key, uint64_t value) in SetUint64Value() 217 bool Attributes::Impl::SetUint32Value(AttributeKey key, uint32_t value) in SetUint32Value() [all …]
|
/base/useriam/user_auth_framework/interfaces/inner_api/ |
D | attributes.h | 34 class Attributes final { 120 Attributes(); 129 explicit Attributes(const std::vector<uint8_t> &raw); 138 Attributes(const Attributes &other) = delete; 145 Attributes &operator=(const Attributes &other) = delete; 152 Attributes(Attributes &&other) noexcept; 159 Attributes &operator=(Attributes &&other) noexcept; 164 virtual ~Attributes(); 236 bool SetAttributesValue(AttributeKey key, const Attributes &value); 380 bool GetAttributesValue(AttributeKey key, Attributes &value) const;
|
D | user_auth_client_callback.h | 42 … virtual void OnAcquireInfo(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo) = 0; 50 virtual void OnResult(int32_t result, const Attributes &extraInfo) = 0; 62 … virtual void OnAcquireInfo(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo) = 0; 70 virtual void OnResult(int32_t result, const Attributes &extraInfo) = 0; 81 virtual void OnResult(int32_t result, const Attributes &extraInfo) = 0; 92 virtual void OnResult(int32_t result, const Attributes &extraInfo) = 0;
|
D | co_auth_client_callback.h | 54 const Attributes &commandAttrs) = 0; 63 virtual int32_t OnEndExecute(uint64_t scheduleId, const Attributes &commandAttrs) = 0; 71 virtual int32_t OnSetProperty(const Attributes &properties) = 0; 80 virtual int32_t OnGetProperty(const Attributes &conditions, Attributes &results) = 0;
|
/base/useriam/user_auth_framework/services/core/src/ |
D | auth_widget_helper.cpp | 58 Attributes values; in GetUserAuthProfile() 77 Attributes::ATTR_SENSOR_INFO, in GetUserAuthProfile() 78 Attributes::ATTR_REMAIN_TIMES, in GetUserAuthProfile() 79 Attributes::ATTR_FREEZING_TIME in GetUserAuthProfile() 82 uint32Keys.push_back(Attributes::ATTR_PIN_SUB_TYPE); in GetUserAuthProfile() 85 Attributes attr; in GetUserAuthProfile() 86 attr.SetInt32Value(Attributes::ATTR_AUTH_TYPE, authType); in GetUserAuthProfile() 87 attr.SetUint32Value(Attributes::ATTR_PROPERTY_MODE, PROPERTY_MODE_GET); in GetUserAuthProfile() 88 attr.SetUint64ArrayValue(Attributes::ATTR_TEMPLATE_ID_LIST, templateIds); in GetUserAuthProfile() 89 attr.SetUint64Value(Attributes::ATTR_CALLER_UID, static_cast<uint64_t>(callingUid)); in GetUserAuthProfile() [all …]
|
D | resource_node_utils.cpp | 44 Attributes properties; in NotifyExecutorToDeleteTemplates() 45 properties.SetUint32Value(Attributes::ATTR_PROPERTY_MODE, PROPERTY_MODE_DEL); in NotifyExecutorToDeleteTemplates() 46 properties.SetUint64Value(Attributes::ATTR_TEMPLATE_ID, info->GetTemplateId()); in NotifyExecutorToDeleteTemplates() 64 Attributes properties; in SendMsgToExecutor() 67 properties.SetInt32Value(UserIam::UserAuth::Attributes::ATTR_PROPERTY_MODE, commandId); in SendMsgToExecutor() 69 …bool setExtraInfoRet = properties.SetUint8ArrayValue(UserIam::UserAuth::Attributes::ATTR_EXTRA_INF… in SendMsgToExecutor() 94 Attributes attr; in SetCachedTemplates() 95 attr.SetUint32Value(Attributes::ATTR_PROPERTY_MODE, PROPERTY_MODE_SET_CACHED_TEMPLATES); in SetCachedTemplates() 96 attr.SetUint64ArrayValue(Attributes::ATTR_TEMPLATE_ID_LIST, templateIds); in SetCachedTemplates()
|
/base/useriam/user_auth_framework/services/context/src/ |
D | simple_auth_context.cpp | 46 Attributes attr; in SetFreezingTimeAndRemainTimes() 47 attr.SetUint32Value(Attributes::ATTR_PROPERTY_MODE, PROPERTY_MODE_GET); in SetFreezingTimeAndRemainTimes() 48 attr.SetUint64ArrayValue(Attributes::ATTR_TEMPLATE_ID_LIST, templateIdList); in SetFreezingTimeAndRemainTimes() 49 std::vector<uint32_t> keys = { Attributes::ATTR_FREEZING_TIME, Attributes::ATTR_REMAIN_TIMES }; in SetFreezingTimeAndRemainTimes() 50 attr.SetUint32ArrayValue(Attributes::ATTR_KEY_LIST, keys); in SetFreezingTimeAndRemainTimes() 52 Attributes values; in SetFreezingTimeAndRemainTimes() 56 bool getFreezingTimeRet = values.GetInt32Value(Attributes::ATTR_FREEZING_TIME, freezingTime); in SetFreezingTimeAndRemainTimes() 58 bool getRemainTimesRet = values.GetInt32Value(Attributes::ATTR_REMAIN_TIMES, remainTimes); in SetFreezingTimeAndRemainTimes() 106 void SimpleAuthContext::OnResult(int32_t resultCode, const std::shared_ptr<Attributes> &scheduleRes… in OnResult() 147 bool SimpleAuthContext::UpdateScheduleResult(const std::shared_ptr<Attributes> &scheduleResultAttr, in UpdateScheduleResult() [all …]
|
/base/useriam/user_auth_framework/frameworks/native/executors/src/async_command/ |
D | auth_command.cpp | 31 const Attributes &attributes, std::shared_ptr<ExecutorMessenger> executorMessenger) in AuthCommand() 33 attributes_(Common::MakeShared<Attributes>(attributes.Serialize())), in AuthCommand() 47 …bool getTemplateIdListRet = attributes_->GetUint64ArrayValue(Attributes::ATTR_TEMPLATE_ID_LIST, te… in SendRequest() 50 bool getTokenIdRet = attributes_->GetUint32Value(Attributes::ATTR_ACCESS_TOKEN_ID, tokenId); in SendRequest() 53 …bool getEndAfterFirstFailRet = attributes_->GetBoolValue(Attributes::ATTR_END_AFTER_FIRST_FAIL, en… in SendRequest() 56 bool getExtraInfoRet = attributes_->GetUint8ArrayValue(Attributes::ATTR_EXTRA_INFO, extraInfo); in SendRequest() 71 auto authAttributes = Common::MakeShared<Attributes>(); in OnResultInner() 73 bool setResultCodeRet = authAttributes->SetUint32Value(Attributes::ATTR_RESULT_CODE, result); in OnResultInner() 76 authAttributes->SetUint8ArrayValue(Attributes::ATTR_RESULT, nonConstExtraInfo); in OnResultInner() 91 Attributes attr; in OnAcquireInfoInner() [all …]
|
D | enroll_command.cpp | 33 const Attributes &attributes, std::shared_ptr<ExecutorMessenger> executorMessenger) in EnrollCommand() 35 attributes_(Common::MakeShared<Attributes>(attributes.Serialize())), in EnrollCommand() 49 bool getTokenIdRet = attributes_->GetUint32Value(Attributes::ATTR_ACCESS_TOKEN_ID, tokenId); in SendRequest() 53 bool getExtraInfoRet = attributes_->GetUint8ArrayValue(Attributes::ATTR_EXTRA_INFO, extraInfo); in SendRequest() 68 auto authAttributes = Common::MakeShared<Attributes>(); in OnResultInner() 70 bool setResultCodeRet = authAttributes->SetUint32Value(Attributes::ATTR_RESULT_CODE, result); in OnResultInner() 73 authAttributes->SetUint8ArrayValue(Attributes::ATTR_RESULT, nonConstExtraInfo); in OnResultInner() 88 Attributes attr; in OnAcquireInfoInner() 89 bool setAcquireRet = attr.SetInt32Value(Attributes::ATTR_TIP_INFO, acquire); in OnAcquireInfoInner() 91 bool setExtraInfoRet = attr.SetUint8ArrayValue(Attributes::ATTR_EXTRA_INFO, extraInfo); in OnAcquireInfoInner()
|
D | identify_command.cpp | 29 const Attributes &attributes, std::shared_ptr<ExecutorMessenger> executorMessenger) in IdentifyCommand() 31 attributes_(Common::MakeShared<Attributes>(attributes.Serialize())), in IdentifyCommand() 45 bool getTokenIdRet = attributes_->GetUint32Value(Attributes::ATTR_ACCESS_TOKEN_ID, tokenId); in SendRequest() 49 bool getExtraInfoRet = attributes_->GetUint8ArrayValue(Attributes::ATTR_EXTRA_INFO, extraInfo); in SendRequest() 63 auto authAttributes = Common::MakeShared<Attributes>(); in OnResultInner() 65 bool setResultCodeRet = authAttributes->SetUint32Value(Attributes::ATTR_RESULT_CODE, result); in OnResultInner() 68 authAttributes->SetUint8ArrayValue(Attributes::ATTR_RESULT, nonConstExtraInfo); in OnResultInner() 83 Attributes attr; in OnAcquireInfoInner() 84 bool setAcquireRet = attr.SetInt32Value(Attributes::ATTR_TIP_INFO, acquire); in OnAcquireInfoInner() 86 bool setExtraInfoRet = attr.SetUint8ArrayValue(Attributes::ATTR_EXTRA_INFO, extraInfo); in OnAcquireInfoInner()
|
/base/account/os_account/services/accountmgr/src/account_iam/ |
D | account_iam_callback.cpp | 35 void AuthCallback::OnResult(int32_t result, const Attributes &extraInfo) in OnResult() 49 extraInfo.GetUint8ArrayValue(Attributes::ATTR_SIGNATURE, token); in OnResult() 59 extraInfo.GetUint8ArrayValue(Attributes::ATTR_ROOT_SECRET, secret); in OnResult() 66 extraInfo.GetInt32Value(Attributes::AttributeKey::ATTR_REMAIN_TIMES, remainTimes); in OnResult() 67 extraInfo.GetInt32Value(Attributes::AttributeKey::ATTR_FREEZING_TIME, freezingTime); in OnResult() 68 Attributes errInfo; in OnResult() 69 errInfo.SetInt32Value(Attributes::AttributeKey::ATTR_REMAIN_TIMES, remainTimes); in OnResult() 70 errInfo.SetInt32Value(Attributes::AttributeKey::ATTR_FREEZING_TIME, freezingTime); in OnResult() 80 void AuthCallback::OnAcquireInfo(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo) in OnAcquireInfo() 90 int32_t oldResult, const Attributes &reqResult, const sptr<IIDMCallback> &idmCallback) in IDMAuthCallback() [all …]
|
/base/useriam/user_auth_framework/test/unittest/inner_api/mocks/ |
D | mock_user_auth_client_callback.h | 28 MOCK_METHOD2(OnResult, void(int32_t result, const Attributes &extraInfo)); 29 …MOCK_METHOD3(OnAcquireInfo, void(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo… 34 MOCK_METHOD2(OnResult, void(int32_t result, const Attributes &extraInfo)); 35 …MOCK_METHOD3(OnAcquireInfo, void(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo… 40 MOCK_METHOD2(OnResult, void(int32_t result, const Attributes &extraInfo)); 45 MOCK_METHOD2(OnResult, void(int32_t result, const Attributes &extraInfo));
|
D | mock_executor_register_callback.h | 33 const Attributes &commandAttrs)); 34 MOCK_METHOD2(OnEndExecute, int32_t(uint64_t scheduleId, const Attributes &commandAttrs)); 35 MOCK_METHOD1(OnSetProperty, int32_t(const Attributes &properties)); 36 MOCK_METHOD2(OnGetProperty, int32_t(const Attributes &conditions, Attributes &results));
|
D | mock_executor_callback_service.h | 31 const Attributes &command)); 32 MOCK_METHOD2(OnEndExecute, int32_t(uint64_t scheduleId, const Attributes &command)); 33 MOCK_METHOD1(OnSetProperty, int32_t(const Attributes &properties)); 34 MOCK_METHOD2(OnGetProperty, int32_t(const Attributes &condition, Attributes &values));
|
/base/account/os_account/services/accountmgr/include/account_iam/ |
D | account_iam_callback.h | 32 void OnAcquireInfo(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo) override; 33 void OnResult(int32_t result, const Attributes &extraInfo) override; 44 int32_t oldResult, const Attributes &reqResult, const sptr<IIDMCallback> &idmCallback); 47 void OnResult(int32_t result, const Attributes &extraInfo) override; 48 void OnAcquireInfo(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo) override; 54 Attributes reqResult_; 66 void OnResult(int32_t result, const Attributes &extraInfo) override; 67 void OnAcquireInfo(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo) override; 81 void OnResult(int32_t result, const Attributes &extraInfo) override; 82 void OnAcquireInfo(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo) override; [all …]
|
/base/useriam/user_auth_framework/frameworks/native/ipc/common_defines/ |
D | executor_callback_interface.h | 33 const Attributes &command) = 0; 34 virtual int32_t OnEndExecute(uint64_t scheduleId, const Attributes &command) = 0; 35 virtual int32_t OnSetProperty(const Attributes &properties) = 0; 36 virtual int32_t OnGetProperty(const Attributes &condition, Attributes &values) = 0;
|
/base/useriam/user_auth_framework/frameworks/native/client/inc/ |
D | executor_callback_service.h | 33 const Attributes &command) override; 34 int32_t OnEndExecute(uint64_t scheduleId, const Attributes &command) override; 35 int32_t OnSetProperty(const Attributes &properties) override; 36 int32_t OnGetProperty(const Attributes &condition, Attributes &values) override;
|
/base/useriam/user_auth_framework/test/unittest/services/mocks/ |
D | mock_executor_callback.h | 34 … int32_t(uint64_t scheduleId, const std::vector<uint8_t> &publicKey, const Attributes &command)); 35 MOCK_METHOD2(OnEndExecute, int32_t(uint64_t scheduleId, const Attributes &command)); 36 MOCK_METHOD1(OnSetProperty, int32_t(const Attributes &properties)); 37 MOCK_METHOD2(OnGetProperty, int32_t(const Attributes &condition, Attributes &values));
|
/base/useriam/user_auth_framework/test/unittest/inner_api/src/ |
D | executor_callback_service_test.cpp | 83 Attributes testCommand; 96 Attributes testCommand; 104 const Attributes &commandAttrs) { in __anone784a9f70202() 119 Attributes testCommand; 131 Attributes testCommand; 138 [&testScheduleId](uint64_t scheduleId, const Attributes &commandAttrs) { in __anone784a9f70302() 151 Attributes testProperties; 162 Attributes testProperties; 169 [](const Attributes &properties) { in __anone784a9f70402() 181 Attributes testCondition; [all …]
|
/base/useriam/user_auth_framework/frameworks/native/ipc/inc/ |
D | executor_callback_proxy.h | 35 const Attributes &command) override; 36 int32_t OnEndExecute(uint64_t scheduleId, const Attributes &command) override; 37 int32_t OnSetProperty(const Attributes &properties) override; 38 int32_t OnGetProperty(const Attributes &condition, Attributes &values) override;
|
/base/useriam/user_auth_framework/frameworks/native/client/src/ |
D | user_auth_client_impl.cpp | 37 void OnAcquireInfo(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo) override; 38 void OnResult(int32_t result, const Attributes &extraInfo) override; 47 …nticationCallback::OnAcquireInfo(int32_t module, uint32_t acquireInfo, const Attributes &extraInfo) in OnAcquireInfo() 69 void NorthAuthenticationCallback::OnResult(int32_t result, const Attributes &extraInfo) in OnResult() 107 Attributes extraInfo; in GetProperty() 116 Attributes extraInfo; in GetProperty() 135 Attributes::AttributeKey key = keys[0]; in SetPropertyInner() 136 Attributes attr; in SetPropertyInner() 139 …bool getArrayRet = request.attrs.GetUint8ArrayValue(static_cast<Attributes::AttributeKey>(key), ex… in SetPropertyInner() 142 … bool setModeRet = attr.SetUint32Value(Attributes::ATTR_PROPERTY_MODE, static_cast<uint32_t>(key)); in SetPropertyInner() [all …]
|
/base/useriam/user_auth_framework/test/unittest/executors/ |
D | executor_unit_test.cpp | 374 Attributes attr; 394 auto commandAttrs = MakeShared<Attributes>(); 417 auto commandAttrs = MakeShared<Attributes>(); 420 commandAttrs->SetUint32Value(Attributes::AttributeKey::ATTR_SCHEDULE_MODE, invalidScheduleMode); 449 … [](uint64_t scheduleId, ExecutorRole srcRole, int32_t resultCode, const Attributes &finalResult) { in __anond2d9aeb01202() 454 EXPECT_EQ(finalResult.GetUint8ArrayValue(Attributes::ATTR_RESULT, extraInfo), true); in __anond2d9aeb01202() 460 auto commandAttrs = MakeShared<Attributes>(); 462 commandAttrs->SetUint32Value(Attributes::AttributeKey::ATTR_SCHEDULE_MODE, ENROLL); 463 commandAttrs->SetUint32Value(Attributes::AttributeKey::ATTR_ACCESS_TOKEN_ID, testTokenId); 464 commandAttrs->SetUint8ArrayValue(Attributes::ATTR_EXTRA_INFO, testExtraInfo); [all …]
|