aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Log
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-09-24 23:37:18 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-10-15 18:33:06 +0200
commitf3aa004b1c18e0a5fe69112b97cf4ac4fd968cb7 (patch)
tree4ad993b2beaba1fd9e624a741c6123073f45874a /lib/private/Log
parentcd3dc1719b8e84526f2c99634f0dc8bf16380579 (diff)
downloadnextcloud-server-f3aa004b1c18e0a5fe69112b97cf4ac4fd968cb7.tar.gz
nextcloud-server-f3aa004b1c18e0a5fe69112b97cf4ac4fd968cb7.zip
refactor(encryption): Migrate away from Hooks to typed events
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Louis <louis@chmn.me> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'lib/private/Log')
-rw-r--r--lib/private/Log/ExceptionSerializer.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php
index 25e52e66f39..904107f6998 100644
--- a/lib/private/Log/ExceptionSerializer.php
+++ b/lib/private/Log/ExceptionSerializer.php
@@ -14,8 +14,9 @@ use OCA\Encryption\Controller\RecoveryController;
use OCA\Encryption\Controller\SettingsController;
use OCA\Encryption\Crypto\Crypt;
use OCA\Encryption\Crypto\Encryption;
-use OCA\Encryption\Hooks\UserHooks;
use OCA\Encryption\KeyManager;
+use OCA\Encryption\Listeners\UserEventsListener;
+use OCA\Encryption\Services\PassphraseService;
use OCA\Encryption\Session;
use OCP\HintException;
@@ -169,14 +170,16 @@ class ExceptionSerializer {
\OCA\Encryption\Users\Setup::class => [
'setupUser',
],
- UserHooks::class => [
- 'login',
- 'postCreateUser',
- 'postDeleteUser',
- 'prePasswordReset',
- 'postPasswordReset',
- 'preSetPassphrase',
- 'setPassphrase',
+ UserEventsListener::class => [
+ 'handle',
+ 'onUserCreated',
+ 'onUserLogin',
+ 'onBeforePasswordUpdated',
+ 'onPasswordUpdated',
+ 'onPasswordReset',
+ ],
+ PassphraseService::class => [
+ 'setPassphraseForUser',
],
];