Signed-off-by: liuziwei <liuziwei12@huawei.com>
This commit is contained in:
liuziwei 2024-09-20 17:02:57 +08:00
parent 0e1ce68861
commit f6df93b58a
3 changed files with 3 additions and 0 deletions

View File

@ -55,6 +55,7 @@ public:
int32_t callerType {0};
std::string callingAppID {""};
bool isPinExpired {false};
bool isOsAccountVerified {false};
};
static std::shared_ptr<Context> CreateSimpleAuthContext(const Authentication::AuthenticationPara &para,

View File

@ -179,6 +179,7 @@ std::shared_ptr<Context> WidgetContext::BuildTask(const std::vector<uint8_t> &ch
para.callerName = para_.callerName;
para.sdkVersion = para_.sdkVersion;
para.authIntent = authIntent;
para.isOsAccountVerified = para_.isOsAccountVerified;
auto context = ContextFactory::CreateSimpleAuthContext(para, widgetCallback);
if (context == nullptr || !ContextPool::Instance().Insert(context)) {
IAM_LOGE("failed to insert context");

View File

@ -852,6 +852,7 @@ uint64_t UserAuthService::StartWidgetContext(const std::shared_ptr<ContextCallba
{
Attributes extraInfo;
para.tokenId = IpcCommon::GetAccessTokenId(*this);
para.isOsAccountVerified = IpcCommon::IsOsAccountVerified(para.userId);
if (!AuthWidgetHelper::InitWidgetContextParam(authParam, validType, widgetParam, para)) {
IAM_LOGE("init widgetContext failed");
contextCallback->SetTraceAuthFinishReason("UserAuthService InitWidgetContextParam fail");