Home
last modified time | relevance | path

Searched refs:tokenId (Results 1 – 25 of 610) sorted by relevance

12345678910>>...25

/base/security/security_component_manager/services/security_component_service/sa/sa_main/
Dsec_comp_perm_manager.cpp36 bool SecCompPermManager::DelaySaveRevokePermission(AccessToken::AccessTokenID tokenId, const std::s… in DelaySaveRevokePermission() argument
43 std::function<void()> delayed = ([tokenId]() { in DelaySaveRevokePermission()
45 SecCompPermManager::GetInstance().RevokeTempSavePermissionCount(tokenId); in DelaySaveRevokePermission()
65 int32_t SecCompPermManager::GrantTempSavePermission(AccessToken::AccessTokenID tokenId) in GrantTempSavePermission() argument
68 std::string taskName = std::to_string(tokenId) + std::to_string(current); in GrantTempSavePermission()
69 if (!DelaySaveRevokePermission(tokenId, taskName)) { in GrantTempSavePermission()
73 saveTaskDequeMap_[tokenId].push_back(taskName); in GrantTempSavePermission()
74 applySaveCountMap_[tokenId]++; in GrantTempSavePermission()
76 tokenId, applySaveCountMap_[tokenId]); in GrantTempSavePermission()
80 void SecCompPermManager::RevokeTempSavePermissionCount(AccessToken::AccessTokenID tokenId) in RevokeTempSavePermissionCount() argument
[all …]
Dsec_comp_perm_manager.h35 int32_t GrantTempSavePermission(AccessToken::AccessTokenID tokenId);
36 void RevokeTempSavePermission(AccessToken::AccessTokenID tokenId);
37 bool VerifySavePermission(AccessToken::AccessTokenID tokenId);
38 bool VerifyPermission(AccessToken::AccessTokenID tokenId, SecCompType type);
40 … int32_t GrantAppPermission(AccessToken::AccessTokenID tokenId, const std::string& permissionName);
41 …int32_t RevokeAppPermission(AccessToken::AccessTokenID tokenId, const std::string& permissionName);
42 void RevokeAppPermissions(AccessToken::AccessTokenID tokenId);
47 void RevokeAppPermisionsDelayed(AccessToken::AccessTokenID tokenId);
48 void CancelAppRevokingPermisions(AccessToken::AccessTokenID tokenId);
51 bool DelaySaveRevokePermission(AccessToken::AccessTokenID tokenId, const std::string& taskName);
[all …]
/base/usb/usb_manager/test/native/service_unittest/src/
Dusb_common_test.cpp78 uint64_t tokenId = GetAccessTokenId(infoInstance); in SetTestCaseNative() local
79 int ret = SetSelfTokenID(tokenId); in SetTestCaseNative()
159 AccessTokenID tokenId = 0; in AllocHapTest() local
162 tokenId = tokenIdEx.tokenIdExStruct.tokenID; in AllocHapTest()
163 if (tokenId != 0) { in AllocHapTest()
164 USB_HILOGI(MODULE_USB_SERVICE, "AllocHapToken success, tokenId: %{public}d", tokenId); in AllocHapTest()
166 USB_HILOGE(MODULE_USB_SERVICE, "AllocHapToken fail,tokenId: %{public}d", tokenId); in AllocHapTest()
168 return tokenId; in AllocHapTest()
172 AccessTokenID tokenId = 0; in AllocHapTestWithUserIdDiff() local
175 tokenId = tokenIdEx.tokenIdExStruct.tokenID; in AllocHapTestWithUserIdDiff()
[all …]
/base/useriam/pin_auth/services/modules/inputters/src/
Dpin_auth_manager.cpp26 bool PinAuthManager::RegisterInputer(uint32_t tokenId, const sptr<InputerGetData> &inputer) in RegisterInputer() argument
29 IAM_LOGI("start, tokenId = %{public}u", tokenId); in RegisterInputer()
30 if (pinAuthInputerMap_.find(tokenId) != pinAuthInputerMap_.end()) { in RegisterInputer()
38 pinAuthInputerMap_.emplace(tokenId, inputer); in RegisterInputer()
39 …ptr<IRemoteObject::DeathRecipient> dr(new (std::nothrow) ResPinauthInputerDeathRecipient(tokenId)); in RegisterInputer()
43 pinAuthDeathMap_.emplace(tokenId, dr); in RegisterInputer()
52 void PinAuthManager::UnRegisterInputer(uint32_t tokenId) in UnRegisterInputer() argument
55 IAM_LOGI("start, tokenId = %{public}u", tokenId); in UnRegisterInputer()
56 if (pinAuthInputerMap_.find(tokenId) != pinAuthInputerMap_.end()) { in UnRegisterInputer()
57 if (pinAuthDeathMap_.find(tokenId) != pinAuthDeathMap_.end()) { in UnRegisterInputer()
[all …]
/base/security/access_token/interfaces/innerkits/nativetoken/test/unittest/src/
Dnativetoken_kit_test.cpp157 uint64_t tokenId; in Start() local
179 tokenId = GetAccessTokenId(&infoInstance); in Start()
183 return tokenId; in Start()
199 uint64_t tokenId; variable
214 tokenId = GetAccessTokenId(&infoInstance);
215 ASSERT_EQ(tokenId, 0);
217 tokenId = GetAccessTokenId(&infoInstance);
218 ASSERT_EQ(tokenId, 0);
223 tokenId = GetAccessTokenId(&infoInstance);
224 ASSERT_EQ(tokenId, 0);
[all …]
/base/location/frameworks/location_common/common/source/
Dpermission_manager.cpp29 bool PermissionManager::CheckLocationPermission(uint32_t tokenId, uint32_t firstTokenId) in CheckLocationPermission() argument
31 return CheckPermission(ACCESS_LOCATION, tokenId, firstTokenId); in CheckLocationPermission()
58 bool PermissionManager::CheckRssProcessName(uint32_t tokenId) in CheckRssProcessName() argument
61 Security::AccessToken::AccessTokenKit::GetNativeTokenInfo(tokenId, callingTokenInfo); in CheckRssProcessName()
69 bool PermissionManager::CheckBackgroundPermission(uint32_t tokenId, uint32_t firstTokenId) in CheckBackgroundPermission() argument
71 return CheckPermission(ACCESS_BACKGROUND_LOCATION, tokenId, firstTokenId); in CheckBackgroundPermission()
74 bool PermissionManager::CheckApproximatelyPermission(uint32_t tokenId, uint32_t firstTokenId) in CheckApproximatelyPermission() argument
76 return CheckPermission(ACCESS_APPROXIMATELY_LOCATION, tokenId, firstTokenId); in CheckApproximatelyPermission()
79 bool PermissionManager::CheckSecureSettings(uint32_t tokenId, uint32_t firstTokenId) in CheckSecureSettings() argument
81 return CheckPermission(MANAGE_SECURE_SETTINGS, tokenId, firstTokenId); in CheckSecureSettings()
[all …]
/base/security/access_token/interfaces/innerkits/accesstoken/test/unittest/accesstoken_mock_test/
Daccesstoken_kit_test.cpp78 AccessTokenID tokenId = 123; variable
79 AccessTokenID localTokenId = AccessTokenKit::AllocLocalTokenID(remoteDevice, tokenId);
109 AccessTokenID tokenId = 123; variable
110 ASSERT_EQ(AccessTokenError::ERR_SERVICE_ABNORMAL, AccessTokenKit::DeleteToken(tokenId));
121 AccessTokenID tokenId = 123; variable
122 ASSERT_EQ(TOKEN_INVALID, AccessTokenKit::GetTokenType(tokenId));
133 AccessTokenID tokenId = 123; variable
135 … ASSERT_EQ(AccessTokenError::ERR_SERVICE_ABNORMAL, AccessTokenKit::CheckNativeDCap(tokenId, dcap));
149 AccessTokenID tokenId = AccessTokenKit::GetHapTokenID(userID, bundleName, instIndex); variable
150 ASSERT_EQ(INVALID_TOKENID, tokenId);
[all …]
/base/inputmethod/imf/services/identity_checker/src/
Didentity_checker_impl.cpp53 bool IdentityCheckerImpl::IsBundleNameValid(uint32_t tokenId, const std::string &validBundleName) in IsBundleNameValid() argument
55 std::string bundleName = GetBundleNameByToken(tokenId); in IsBundleNameValid()
68 bool IdentityCheckerImpl::HasPermission(uint32_t tokenId, const std::string &permission) in HasPermission() argument
70 if (AccessTokenKit::VerifyAccessToken(tokenId, permission) != PERMISSION_GRANTED) { in HasPermission()
78 bool IdentityCheckerImpl::IsBroker(AccessTokenID tokenId) in IsBroker() argument
81 AccessTokenKit::GetNativeTokenInfo(tokenId, nativeTokenInfoRes); in IsBroker()
85 bool IdentityCheckerImpl::IsNativeSa(AccessTokenID tokenId) in IsNativeSa() argument
87 return AccessTokenKit::GetTokenType(tokenId) == TypeATokenTypeEnum::TOKEN_NATIVE; in IsNativeSa()
90 std::string IdentityCheckerImpl::GetBundleNameByToken(uint32_t tokenId) in GetBundleNameByToken() argument
92 auto tokenType = AccessTokenKit::GetTokenTypeFlag(tokenId); in GetBundleNameByToken()
[all …]
/base/security/access_token/services/privacymanager/src/record/
Dpermission_record_manager.cpp117 uint32_t tokenId = appStateData.accessTokenId; in OnForegroundApplicationChanged() local
125 PermissionRecordManager::GetInstance().NotifyAppStateChange(tokenId, status); in OnForegroundApplicationChanged()
159 …record.tokenId, record.opCode, record.status, record.lockScreenStatus, record.timestamp, record.ty… in AddRecord()
165 if (AccessTokenKit::GetTokenTypeFlag(info.tokenId) != TOKEN_HAP) { in GetPermissionRecord()
166 ACCESSTOKEN_LOG_DEBUG(LABEL, "Not hap(%{public}d)", info.tokenId); in GetPermissionRecord()
177 record.status = GetAppStatus(info.tokenId); in GetPermissionRecord()
180 record.tokenId = info.tokenId; in GetPermissionRecord()
202 bool PermissionRecordManager::AddOrUpdateUsedTypeIfNeeded(const AccessTokenID tokenId, const int32_… in AddOrUpdateUsedTypeIfNeeded() argument
209 conditionValue.Put(PrivacyFiledConst::FIELD_TOKEN_ID, static_cast<int32_t>(tokenId)); in AddOrUpdateUsedTypeIfNeeded()
223 recordValue.Put(PrivacyFiledConst::FIELD_TOKEN_ID, static_cast<int32_t>(tokenId)); in AddOrUpdateUsedTypeIfNeeded()
[all …]
/base/security/access_token/interfaces/innerkits/analysis_model/test/unittest/
Dcode_signature_analysis_kit_test.cpp55 uint32_t tokenId; member
195 …tic void ReportErrorEventMock(DataChangeTypeCode optType, const char* bundleName, uint32_t tokenId) in ReportErrorEventMock() argument
202 g_reportInfo.tokenId = tokenId; in ReportErrorEventMock()
229 ReportErrorEventMock(EVENT_REPORTED, g_bundleInfo[0].name, g_bundleInfo[0].tokenId);
236 ReportErrorEventMock(EVENT_REPORTED, g_bundleInfo[0].name, g_bundleInfo[0].tokenId);
250 EXPECT_EQ(g_bundleInfo[0].tokenId, result->tokenId);
253 ReportErrorEventMock(OUT_OF_STORAGE_LIFE, g_bundleInfo[0].name, g_bundleInfo[0].tokenId);
285 ReportErrorEventMock(EVENT_REPORTED, g_bundleInfo[0].name, g_bundleInfo[0].tokenId);
291 EXPECT_EQ(g_bundleInfo[0].tokenId, result[0].tokenId);
294 ReportErrorEventMock(EVENT_REPORTED, g_bundleInfo[1].name, g_bundleInfo[1].tokenId);
[all …]
/base/location/test/location_locator/source/
Dpermission_manager_test.cpp123 uint32_t tokenId = static_cast<uint32_t>(tokenId_); variable
124 EXPECT_EQ(true, PermissionManager::CheckLocationPermission(tokenId, 0));
125 EXPECT_EQ(true, PermissionManager::CheckApproximatelyPermission(tokenId, 0));
126 EXPECT_EQ(true, PermissionManager::CheckBackgroundPermission(tokenId, 0));
127 EXPECT_EQ(true, PermissionManager::CheckSecureSettings(tokenId, 0));
130 EXPECT_EQ(false, PermissionManager::CheckLocationPermission(tokenId, 1));
131 EXPECT_EQ(false, PermissionManager::CheckApproximatelyPermission(tokenId, 1));
132 EXPECT_EQ(false, PermissionManager::CheckBackgroundPermission(tokenId, 1));
133 EXPECT_EQ(false, PermissionManager::CheckSecureSettings(tokenId, 1));
136 EXPECT_EQ(true, PermissionManager::CheckLocationPermission(tokenId, tokenId));
[all …]
/base/useriam/pin_auth/services/sa/src/
Dpin_auth_service.cpp79 uint32_t tokenId = this->GetFirstTokenID(); in GetTokenId() local
80 if (tokenId == 0) { in GetTokenId()
81 tokenId = this->GetCallingTokenID(); in GetTokenId()
83 return tokenId; in GetTokenId()
109 uint32_t tokenId = GetTokenId(); in CheckPermission() local
110 return AccessTokenKit::VerifyAccessToken(tokenId, permission) == RET_SUCCESS; in CheckPermission()
124 uint32_t tokenId = GetTokenId(); in RegisterInputer() local
125 return PinAuthManager::GetInstance().RegisterInputer(tokenId, inputer); in RegisterInputer()
135 uint32_t tokenId = GetTokenId(); in UnRegisterInputer() local
136 PinAuthManager::GetInstance().UnRegisterInputer(tokenId); in UnRegisterInputer()
/base/security/access_token/services/privacymanager/include/record/
Dpermission_record_manager.h73 void RemovePermissionUsedRecords(AccessTokenID tokenId, const std::string& deviceID);
77 int32_t StartUsingPermission(AccessTokenID tokenId, const std::string& permissionName);
78 int32_t StartUsingPermission(AccessTokenID tokenId, const std::string& permissionName,
80 int32_t StopUsingPermission(AccessTokenID tokenId, const std::string& permissionName);
85 void CallbackExecute(AccessTokenID tokenId, const std::string& permissionName, int32_t status);
87 bool IsAllowedUsingPermission(AccessTokenID tokenId, const std::string& permissionName);
88 … int32_t GetPermissionUsedTypeInfos(const AccessTokenID tokenId, const std::string& permissionName,
97 void NotifyAppStateChange(AccessTokenID tokenId, ActiveChangeType status);
103 void NotifyCameraWindowChange(bool isPip, AccessTokenID tokenId, bool isShowing);
109 void RemoveRecordFromStartListByToken(const AccessTokenID tokenId);
[all …]
/base/location/interfaces/inner_api/include/
Dpermission_manager.h37 static bool CheckLocationPermission(uint32_t tokenId, uint32_t firstTokenId);
38 static bool CheckApproximatelyPermission(uint32_t tokenId, uint32_t firstTokenId);
39 static bool CheckBackgroundPermission(uint32_t tokenId, uint32_t firstTokenId);
40 …static bool CheckPermission(const std::string &permission, uint32_t tokenId, uint32_t firstTokenId…
41 static bool CheckSecureSettings(uint32_t tokenId, uint32_t firstTokenId);
43 static bool CheckRssProcessName(uint32_t tokenId);
45 static int GetPermissionLevel(uint32_t tokenId, uint32_t firstTokenId);
/base/security/access_token/interfaces/innerkits/accesstoken/src/
Dtokenid_kit.cpp31 bool TokenIdKit::IsSystemAppByFullTokenID(uint64_t tokenId) in IsSystemAppByFullTokenID() argument
33 ACCESSTOKEN_LOG_DEBUG(LABEL, "called, tokenId=%{public}" PRId64, tokenId); in IsSystemAppByFullTokenID()
34 return (tokenId & SYSTEM_APP_MASK) == SYSTEM_APP_MASK; in IsSystemAppByFullTokenID()
36 uint64_t TokenIdKit::GetRenderTokenID(uint64_t tokenId) in GetRenderTokenID() argument
38 AccessTokenID id = tokenId & TOKEN_ID_LOWMASK; in GetRenderTokenID()
41 return tokenId; in GetRenderTokenID()
/base/security/asset/services/os_dependency/src/
Dbms_wrapper.cpp34 int32_t GetHapInfo(int32_t userId, uint32_t tokenId, std::string &info) in GetHapInfo() argument
37 int32_t ret = AccessTokenKit::GetHapTokenInfo(tokenId, tokenInfo); in GetHapInfo()
54 int32_t GetProcessInfo(uint32_t tokenId, uint64_t uid, std::string &info) in GetProcessInfo() argument
57 int32_t ret = AccessTokenKit::GetNativeTokenInfo(tokenId, tokenInfo); in GetProcessInfo()
67 int32_t GetHapBundleName(int32_t userId, uint32_t tokenId, uint8_t *name, uint32_t *nameLen, int32_… in GetHapBundleName() argument
70 int32_t ret = AccessTokenKit::GetHapTokenInfo(tokenId, hapTokenInfo); in GetHapBundleName()
92 int32_t GetNativePackageName(uint32_t tokenId, uint8_t *name, uint32_t *nameLen) in GetNativePackageName() argument
95 int32_t ret = AccessTokenKit::GetNativeTokenInfo(tokenId, nativeTokenInfo); in GetNativePackageName()
116 auto tokenId = IPCSkeleton::GetCallingTokenID(); in GetOwnerInfo() local
117 ATokenTypeEnum tokenType = AccessTokenKit::GetTokenTypeFlag(tokenId); in GetOwnerInfo()
[all …]
/base/accesscontrol/sandbox_manager/interfaces/innerkits/sandbox_manager/src/
Dsandbox_manager_kit.cpp58 uint64_t tokenId, const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result) in PersistPolicy() argument
62 if ((policySize == 0) || (policySize > POLICY_VECTOR_SIZE_LIMIT) || (tokenId == 0)) { in PersistPolicy()
64 static_cast<uint32_t>(policySize), tokenId); in PersistPolicy()
68 return SandboxManagerClient::GetInstance().PersistPolicyByTokenId(tokenId, policy, result); in PersistPolicy()
72 uint64_t tokenId, const std::vector<PolicyInfo> &policy, std::vector<uint32_t> &result) in UnPersistPolicy() argument
76 if ((policySize == 0) || (policySize > POLICY_VECTOR_SIZE_LIMIT) || (tokenId == 0)) { in UnPersistPolicy()
78 static_cast<uint32_t>(policySize), tokenId); in UnPersistPolicy()
82 return SandboxManagerClient::GetInstance().UnPersistPolicyByTokenId(tokenId, policy, result); in UnPersistPolicy()
85 int32_t SandboxManagerKit::SetPolicy(uint64_t tokenId, const std::vector<PolicyInfo> &policy, uint6… in SetPolicy() argument
89 if ((policySize == 0) || (policySize > POLICY_VECTOR_SIZE_LIMIT) || (tokenId == 0)) { in SetPolicy()
[all …]
/base/accesscontrol/sandbox_manager/
DREADME_zh.md51 …t32_t PersistPolicy(uint64_t tokenId, const std::vector\<PolicyInfo\> &policy, std::vector<uint32_…
52 …2_t UnPersistPolicy(uint64_t tokenId, const std::vector\<PolicyInfo\> &policy, std::vector<uint32_…
53 | int32_t SetPolicy(uint64_t tokenId, const std::vector\<PolicyInfo\> &policy, uint64_t policyFlag)…
56 | int32_t CheckPersistPolicy(uint64_t tokenId, const std::vector\<PolicyInfo\> &policy, std::vector…
71 // 设置指定tokenId的持久化规则
72 uint64_t tokenId;
73 int32_t sandboxManagerErrCode = SandboxManagerKit::PersistPolicy(tokenId, policys, results);
74 // 删除指定tokenId的持久化规则
75 int32_t sandboxManagerErrCode = SandboxManagerKit::UnPersistPolicy(tokenId, policys, results);
84 uint64_t targetTokenId; // 设置临时规则的目标应用tokenId
[all …]
/base/security/access_token/services/accesstokenmanager/main/cpp/src/token/
Daccesstoken_id_manager.cpp64 AccessTokenID tokenId = *it; in RegisterTokenId() local
65 AccessTokenIDInner *idInnerExist = reinterpret_cast<AccessTokenIDInner *>(&tokenId); in RegisterTokenId()
79 AccessTokenID tokenId = *it; in GetHapTokenIdList() local
80 if (TOKEN_HAP == GetTokenIdTypeEnum(tokenId)) { in GetHapTokenIdList()
101 AccessTokenID tokenId = *reinterpret_cast<AccessTokenID *>(&innerId); in CreateTokenId() local
102 return tokenId; in CreateTokenId()
107 AccessTokenID tokenId = 0; in CreateAndRegisterTokenId() local
110 tokenId = CreateTokenId(type, dlpType); in CreateAndRegisterTokenId()
111 if (tokenId == INVALID_TOKENID) { in CreateAndRegisterTokenId()
116 int ret = RegisterTokenId(tokenId, type); in CreateAndRegisterTokenId()
[all …]
/base/security/access_token/services/accesstokenmanager/main/cpp/src/permission/
Dpermission_definition_cache.cpp53 bool PermissionDefinitionCache::Insert(const PermissionDef& info, AccessTokenID tokenId) in Insert() argument
63 permissionDefinitionMap_[info.permissionName].tokenId = tokenId; in Insert()
64 if (!hasHapPermissionDefinition_ && (tokenId != EXTENSION_PERMISSION_ID)) { in Insert()
70 bool PermissionDefinitionCache::Update(const PermissionDef& info, AccessTokenID tokenId) in Update() argument
74 permissionDefinitionMap_[info.permissionName].tokenId = tokenId; in Update()
135 if ((it != permissionDefinitionMap_.end()) && (it->second.tokenId != EXTENSION_PERMISSION_ID)) { in HasHapPermissionDefinitionForHap()
153 … genericValues.Put(TokenFiledConst::FIELD_TOKEN_ID, static_cast<int32_t>(it->second.tokenId)); in StorePermissionDef()
165 if (tokenID == it->second.tokenId) { in StorePermissionDef()
167 … genericValues.Put(TokenFiledConst::FIELD_TOKEN_ID, static_cast<int32_t>(it->second.tokenId)); in StorePermissionDef()
176 AccessTokenID tokenId) in GetDefPermissionsByTokenId() argument
[all …]
/base/security/access_token/services/privacymanager/test/unittest/
Dpermission_record_manager_test.cpp149 …AccessTokenID tokenId = AccessTokenKit::GetHapTokenID(g_InfoParms1.userID, g_InfoParms1.bundleName, in TearDown() local
151 AccessTokenKit::DeleteToken(tokenId); in TearDown()
152 PrivacyKit::RemovePermissionUsedRecords(tokenId, ""); in TearDown()
153 tokenId = AccessTokenKit::GetHapTokenID(g_InfoParms2.userID, g_InfoParms2.bundleName, in TearDown()
155 AccessTokenKit::DeleteToken(tokenId); in TearDown()
156 PrivacyKit::RemovePermissionUsedRecords(tokenId, ""); in TearDown()
168 virtual void StateChangeNotify(AccessTokenID tokenId, bool isShow) in StateChangeNotify() argument
263 …AccessTokenID tokenId = AccessTokenKit::GetHapTokenID(g_InfoParms1.userID, g_InfoParms1.bundleName, variable
265 ASSERT_NE(INVALID_TOKENID, tokenId);
284 …AccessTokenID tokenId = AccessTokenKit::GetHapTokenID(g_InfoParms1.userID, g_InfoParms1.bundleName, variable
[all …]
/base/security/access_token/interfaces/innerkits/accesstoken/test/unittest/src/
Daccesstoken_deny_test.cpp132 AccessTokenID tokenId = 123; variable
133 AccessTokenID localTokenId = AccessTokenKit::AllocLocalTokenID(remoteDevice, tokenId);
163 AccessTokenID tokenId = 123; variable
164 ASSERT_EQ(AccessTokenError::ERR_PERMISSION_DENIED, AccessTokenKit::DeleteToken(tokenId));
175 AccessTokenID tokenId = 123; variable
177 …ASSERT_EQ(AccessTokenError::ERR_PERMISSION_DENIED, AccessTokenKit::CheckNativeDCap(tokenId, dcap));
191 AccessTokenID tokenId = AccessTokenKit::GetHapTokenID(userID, bundleName, instIndex); variable
192 ASSERT_EQ(INVALID_TOKENID, tokenId);
203 AccessTokenID tokenId = 123; variable
205 …ASSERT_EQ(AccessTokenError::ERR_PERMISSION_DENIED, AccessTokenKit::GetHapTokenInfo(tokenId, tokenI…
[all …]
/base/request/request/services/src/cxx/
Dc_check_permission.cpp24 bool DownloadServerCheckPermission(uint64_t tokenId, CStringWrapper permission) in DownloadServerCheckPermission() argument
26 …peATokenTypeEnum tokenType = AccessTokenKit::GetTokenTypeFlag(static_cast<AccessTokenID>(tokenId)); in DownloadServerCheckPermission()
31 …int result = AccessTokenKit::VerifyAccessToken(tokenId, std::string(permission.cStr, permission.le… in DownloadServerCheckPermission()
40 bool RequestIsSystemAPI(uint64_t tokenId) in RequestIsSystemAPI() argument
42 return TokenIdKit::IsSystemAppByFullTokenID(tokenId); in RequestIsSystemAPI()
/base/security/access_token/services/privacymanager/test/coverage/
Dpermission_record_manager_coverage_test.cpp146 .tokenId = RANDOM_TOKENID,
181 …AccessTokenID tokenId = AccessTokenKit::GetHapTokenID(g_InfoParms1.userID, g_InfoParms1.bundleName, in TearDown() local
183 AccessTokenKit::DeleteToken(tokenId); in TearDown()
184 tokenId = AccessTokenKit::GetHapTokenID(g_InfoParms2.userID, g_InfoParms2.bundleName, in TearDown()
186 AccessTokenKit::DeleteToken(tokenId); in TearDown()
198 virtual void StateChangeNotify(AccessTokenID tokenId, bool isShow) in StateChangeNotify() argument
247 g_recordA1.tokenId = tokenId1;
248 g_recordA2.tokenId = tokenId1;
249 g_recordB1.tokenId = tokenId2;
250 g_recordB2.tokenId = tokenId2;
[all …]
/base/security/access_token/services/privacymanager/src/service/
Dprivacy_manager_service.cpp97 …" failCount: %{public}d, type: %{public}d", infoParcel.info.tokenId, infoParcel.info.permissionNam… in AddPermissionUsedRecord()
103 int32_t PrivacyManagerService::StartUsingPermission(AccessTokenID tokenId, const std::string& permi… in StartUsingPermission() argument
105 …ACCESSTOKEN_LOG_INFO(LABEL, "tokenId: %{public}d, permissionName: %{public}s", tokenId, permission… in StartUsingPermission()
106 return PermissionRecordManager::GetInstance().StartUsingPermission(tokenId, permissionName); in StartUsingPermission()
109 int32_t PrivacyManagerService::StartUsingPermission(AccessTokenID tokenId, const std::string& permi… in StartUsingPermission() argument
112 …ACCESSTOKEN_LOG_INFO(LABEL, "tokenId: %{public}d, permissionName: %{public}s", tokenId, permission… in StartUsingPermission()
113 …return PermissionRecordManager::GetInstance().StartUsingPermission(tokenId, permissionName, callba… in StartUsingPermission()
116 int32_t PrivacyManagerService::StopUsingPermission(AccessTokenID tokenId, const std::string& permis… in StopUsingPermission() argument
118 …ACCESSTOKEN_LOG_INFO(LABEL, "tokenId: %{public}d, permissionName: %{public}s", tokenId, permission… in StopUsingPermission()
119 return PermissionRecordManager::GetInstance().StopUsingPermission(tokenId, permissionName); in StopUsingPermission()
[all …]

12345678910>>...25