vendor/uvdesk/core-framework/Controller/Session.php line 11

Open in your IDE?
  1. <?php
  2. namespace Webkul\UVDesk\CoreFrameworkBundle\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\JsonResponse;
  5. use Symfony\Component\HttpFoundation\Session\SessionInterface;
  6. class Session extends AbstractController
  7. {
  8. public function checkSession(SessionInterface $session): JsonResponse
  9. {
  10. if (! $this->getUser()) {
  11. return new JsonResponse(['session' => 'expired'], 401);
  12. }
  13. return new JsonResponse(['session' => 'active']);
  14. }
  15. }