remove hook

This commit is contained in:
Yuri Kuznetsov
2021-09-11 16:52:42 +03:00
parent dcc2b2cb31
commit f6c8281c9e
3 changed files with 1 additions and 31 deletions
@@ -266,7 +266,7 @@ class Authentication
$result = $this->processTwoFactor($result, $request);
if ($result->isFail()) {
return $this->processFailSecondStep(
return $this->processFail(
$result,
$data,
$request
@@ -617,14 +617,6 @@ class Authentication
return $result;
}
private function processFailSecondStep(Result $result, AuthenticationData $data, Request $request): Result
{
$this->hookManager->processOnFailSecondStep($result, $data, $request);
$this->hookManager->processOnFail($result, $data, $request);
return $result;
}
private function processSuccess(
Result $result,
AuthenticationData $data,
@@ -62,13 +62,6 @@ class Manager
}
}
public function processOnFailSecondStep(Result $result, AuthenticationData $data, Request $request): void
{
foreach ($this->getOnFailSecondStepHookList() as $hook) {
$hook->process($result, $data, $request);
}
}
public function processOnSuccess(Result $result, AuthenticationData $data, Request $request): void
{
foreach ($this->getOnSuccessHookList() as $hook) {
@@ -128,20 +121,6 @@ class Manager
return $list;
}
/**
* @return OnResult[]
*/
private function getOnFailSecondStepHookList(): array
{
$list = [];
foreach ($this->getHookClassNameList('onFailSecondStep') as $className) {
$list[] = $this->injectableFactory->create($className);
}
return $list;
}
/**
* @return OnResult[]
*/
@@ -3,7 +3,6 @@
"Espo\\Core\\Authentication\\Hook\\Hooks\\FailedAttemptsLimit"
],
"onFailHookClassNameList": [],
"onFailSecondStepHookClassNameList": [],
"onSuccessHookClassNameList": [],
"onSuccessByTokenHookClassNameList": [],
"onSecondStepRequiredHookClassNameList": []