package edu.gjoko.schedlr.controllers.rest; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; @RestController @RequestMapping("api/user") @AllArgsConstructor public class UserApi { @GetMapping(path = "/me") public boolean findAll(HttpServletRequest request) { return request.getSession(true).getAttribute("stakeholderId") != null; } }