Changeset 43c9090 for src/main/java/finki/it/terapijamkbackend/spring/controllers/AuthController.java
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/finki/it/terapijamkbackend/spring/controllers/AuthController.java
r743de55 r43c9090 3 3 import finki.it.terapijamkbackend.spring.dto.LoginResponse; 4 4 import finki.it.terapijamkbackend.spring.entities.User; 5 import finki.it.terapijamkbackend.spring.entities.UserRole;6 5 import finki.it.terapijamkbackend.spring.services.UserService; 7 6 import jakarta.servlet.http.Cookie; … … 49 48 Cookie usernameCookie = new Cookie("username", temp.getUsername()); 50 49 usernameCookie.setPath("/"); 51 usernameCookie.setMaxAge(60 *5);50 usernameCookie.setMaxAge(600); 52 51 response.addCookie(usernameCookie); 52 53 Cookie roleCookie = new Cookie("role", temp.getUserRole().toString()); 54 roleCookie.setPath("/"); 55 roleCookie.setMaxAge(600); 56 response.addCookie(roleCookie); 53 57 54 58 return ResponseEntity.ok(loginResponse);
Note:
See TracChangeset
for help on using the changeset viewer.