Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use OCP\AppFramework\Middleware;
use OCP\ISession;
use OCP\IUserSession;
use Psr\Log\LoggerInterface;
use ReflectionMethod;

// Will close the session if the user session is ephemeral.
Expand All @@ -24,6 +25,7 @@ public function __construct(
private ISession $session,
private IUserSession $userSession,
private ControllerMethodReflector $reflector,
private LoggerInterface $logger,
) {
}

Expand Down Expand Up @@ -52,6 +54,10 @@ public function beforeController(Controller $controller, string $methodName) {
return;
}

$this->logger->info('Closing user and PHP session for ephemeral session', [
'controller' => $controller::class,
'method' => $methodName,
]);
$this->userSession->logout();
$this->session->close();
}
Expand Down
Loading