mirror of
https://gitee.com/openharmony/useriam_user_auth_framework
synced 2024-11-26 17:31:26 +00:00
commit
8e92c28456
@ -68,7 +68,11 @@ uint64_t AuthResManager::Register(std::shared_ptr<ResAuthExecutor> executorInfo,
|
||||
|
||||
// Assign messenger
|
||||
sptr<UserIAM::AuthResPool::IExecutorMessenger> messenger =
|
||||
new UserIAM::AuthResPool::ExecutorMessenger(&coAuthResPool_);
|
||||
new (std::nothrow) UserIAM::AuthResPool::ExecutorMessenger(&coAuthResPool_);
|
||||
if (messenger == nullptr) {
|
||||
COAUTH_HILOGE(MODULE_SERVICE, "messenger is nullptr");
|
||||
return INVALID_EXECUTOR_ID;
|
||||
}
|
||||
callback->OnMessengerReady(messenger);
|
||||
COAUTH_HILOGD(MODULE_SERVICE, "register is successfull, exeID is 0xXXXX%{public}04" PRIx64, MASK & executorId);
|
||||
return executorId;
|
||||
|
@ -204,8 +204,10 @@ int32_t UserIDMController::UpdateCredentialCtrl(int32_t userId, uint64_t callerI
|
||||
data_->InsertScheduleId(scheduleId);
|
||||
std::shared_ptr<UserIDMCoAuthHandler> coAuthCallback =
|
||||
std::make_shared<UserIDMCoAuthHandler>(MODIFY_CRED, challenge, scheduleId, data_, innerkitsCallback);
|
||||
sptr<IRemoteObject::DeathRecipient> dr = new CoAuthCallbackDeathRecipient(coAuthCallback);
|
||||
if (!innerkitsCallback->AsObject()->AddDeathRecipient(dr)) {
|
||||
sptr<IRemoteObject::DeathRecipient> dr = new (std::nothrow) CoAuthCallbackDeathRecipient(coAuthCallback);
|
||||
if (dr == nullptr) {
|
||||
COAUTH_HILOGE(MODULE_SERVICE, "dr is nullptr");
|
||||
} else if (!innerkitsCallback->AsObject()->AddDeathRecipient(dr)) {
|
||||
USERIDM_HILOGE(MODULE_SERVICE, "Failed to add death recipient CoAuthCallbackDeathRecipient");
|
||||
}
|
||||
CoAuth::AuthInfo paramInfo;
|
||||
@ -254,8 +256,10 @@ int32_t UserIDMController::DelFaceCredentialCtrl(AuthType authType, AuthSubType
|
||||
}
|
||||
std::shared_ptr<UserIDMSetPropHandler> setPropCallback =
|
||||
std::make_shared<UserIDMSetPropHandler>(FACE, 0, 0, credentialId, data_, innerCallback);
|
||||
sptr<IRemoteObject::DeathRecipient> dr = new SetPropCallbackDeathRecipient(setPropCallback);
|
||||
if (!innerCallback->AsObject()->AddDeathRecipient(dr)) {
|
||||
sptr<IRemoteObject::DeathRecipient> dr = new (std::nothrow) SetPropCallbackDeathRecipient(setPropCallback);
|
||||
if (dr == nullptr) {
|
||||
COAUTH_HILOGE(MODULE_SERVICE, "dr is nullptr");
|
||||
} else if (!innerCallback->AsObject()->AddDeathRecipient(dr)) {
|
||||
USERIDM_HILOGE(MODULE_SERVICE, "Failed to add death recipient SetPropCallbackDeathRecipient");
|
||||
}
|
||||
AuthResPool::AuthAttributes condition;
|
||||
|
Loading…
Reference in New Issue
Block a user