Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95610856 authored by theronakpatel's avatar theronakpatel
Browse files

password change event - more logger added

parent 25a5b353
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -37,10 +37,10 @@ class PasswordUpdatedListener implements IEventListener {
			return;
		}

		$this->logger->error('PasswordUpdatedListener: Event received', ['app' => Application::APP_ID]);
		$this->logger->debug('PasswordUpdatedListener: Event received', ['app' => Application::APP_ID]);

		if (!$this->userSession->isLoggedIn() || !$this->session->exists('is_oidc')) {
			$this->logger->error('PasswordUpdatedListener: Skipping - user not logged in or not OIDC session', [
			$this->logger->debug('PasswordUpdatedListener: Skipping - user not logged in or not OIDC session', [
				'isLoggedIn' => $this->userSession->isLoggedIn(),
				'hasOidcSession' => $this->session->exists('is_oidc'),
				'app' => Application::APP_ID
@@ -51,14 +51,14 @@ class PasswordUpdatedListener implements IEventListener {
		$user = $event->getUser();
		$username = $user->getUID();

		$this->logger->error('PasswordUpdatedListener: Attempting SSO logout for user', [
		$this->logger->info('PasswordUpdatedListener: Attempting SSO logout for user', [
			'username' => $username,
			'app' => Application::APP_ID
		]);

		try {
			$this->ssoService->logout($username);
			$this->logger->error('PasswordUpdatedListener: SSO logout completed successfully', [
			$this->logger->info('PasswordUpdatedListener: SSO logout completed successfully', [
				'username' => $username,
				'app' => Application::APP_ID
			]);
+3 −3
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ class SSOService {

		$url = $this->ssoConfig['admin_rest_api_url'] . self::USERS_ENDPOINT . '/' . $this->currentUserId . '/logout';

		$this->logger->error('SSOService::logout: Calling SSO API', [
		$this->logger->debug('SSOService::logout: Calling SSO API', [
			'url' => $url,
			'username' => $username,
			'userId' => $this->currentUserId,
@@ -152,7 +152,7 @@ class SSOService {
		
		try {
			$this->callSSOAPI($url, 'POST', [], 204);
			$this->logger->error('SSOService::logout: SSO API call successful', [
			$this->logger->debug('SSOService::logout: SSO API call successful', [
				'url' => $url,
				'username' => $username,
				'app' => Application::APP_ID
@@ -211,7 +211,7 @@ class SSOService {
		$clientsCache = $this->cacheFactory->createDistributed('ecloud_accounts_realm_clients');
		$cachedClients = $clientsCache->get($cacheKey);
		if ($cachedClients !== null) {
			$this->logger->error('Returning cached clients from distributed cache');
			$this->logger->debug('Returning cached clients from distributed cache');
			return $cachedClients;
		}