diff --git a/interfaces/innerkits/accesstoken/include/access_token.h b/interfaces/innerkits/accesstoken/include/access_token.h index 263fe166026d0d902fd0de20222006411c7f5e0f..b5f3e732b9aeae3dae792da3c2bb510f0d3a88bc 100644 --- a/interfaces/innerkits/accesstoken/include/access_token.h +++ b/interfaces/innerkits/accesstoken/include/access_token.h @@ -46,6 +46,7 @@ typedef enum TypeATokenTypeEnum { } ATokenTypeEnum; typedef enum TypeATokenAplEnum { + APL_INVALID = 0, APL_NORMAL = 1, APL_SYSTEM_BASIC = 2, APL_SYSTEM_CORE = 3, diff --git a/services/tokensyncmanager/src/command/sync_remote_hap_token_command.cpp b/services/tokensyncmanager/src/command/sync_remote_hap_token_command.cpp index cb5d801a551072820297166e4e7c9d6394e18010..65d0ef836fd31716f4b76927a2f1c292ae79b247 100644 --- a/services/tokensyncmanager/src/command/sync_remote_hap_token_command.cpp +++ b/services/tokensyncmanager/src/command/sync_remote_hap_token_command.cpp @@ -51,6 +51,17 @@ SyncRemoteHapTokenCommand::SyncRemoteHapTokenCommand( SyncRemoteHapTokenCommand::SyncRemoteHapTokenCommand(const std::string &json) { requestTokenId_ = 0; + hapTokenInfo_.baseInfo.apl = APL_INVALID; + hapTokenInfo_.baseInfo.appID = ""; + hapTokenInfo_.baseInfo.bundleName = ""; + hapTokenInfo_.baseInfo.deviceID = ""; + hapTokenInfo_.baseInfo.instIndex = 0; + hapTokenInfo_.baseInfo.dlpType = 0; + hapTokenInfo_.baseInfo.tokenAttr = 0; + hapTokenInfo_.baseInfo.tokenID = 0; + hapTokenInfo_.baseInfo.userID = 0; + hapTokenInfo_.baseInfo.ver = DEFAULT_TOKEN_VERSION; + nlohmann::json jsonObject = nlohmann::json::parse(json, nullptr, false); BaseRemoteCommand::FromRemoteProtocolJson(jsonObject); if (jsonObject.find("requestTokenId") != jsonObject.end() && jsonObject.at("requestTokenId").is_number()) {