session->get(ClientFlowLoginV2Controller::EPHEMERAL_NAME)) { return; } if ( $controller instanceof ClientFlowLoginV2Controller && ($methodName === 'grantPage' || $methodName === 'generateAppPassword') ) { return; } if ($controller instanceof TwoFactorChallengeController) { return; } $reflectionMethod = new ReflectionMethod($controller, $methodName); if (!empty($reflectionMethod->getAttributes(PublicPage::class))) { return; } if ($this->reflector->hasAnnotation('PublicPage')) { return; } $this->userSession->logout(); $this->session->close(); } }